Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Test & Set Instruction

Status
Not open for further replies.

jmeadows7

IS-IT--Management
Jun 13, 2001
148
US
Is there a method of testing a flag within the database and setting the value all within one instruction. I want to create a semaphore so two users don't try to the same logical thing in an applicaiton at the same time. While the likelihood of this actually happening are VERY remote, we all know it will happen at some point.

I know I use to use this a log programming IBM 370 3090 systems with Assembly language - the test and set instruciton.

Thanks,
 
You can use CASE

syntax:
WHEN A THEN B
WHEN B THEN C

See BOL and put in CASE
DBomrrsm
 
Good Call - forgot all about the good ole case statement
I'll give it a shot!
Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top