Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check record and insert
Message
From
05/10/2007 02:12:37
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Title:
Check record and insert
Miscellaneous
Thread ID:
01258809
Message ID:
01258809
Views:
51
in SP, i would like to "check the record to see whether prefix" ABC" doesn't exist or not"

Parameter @prefix
if not exist
insert myNumber(prefix, number) values ("ABC",1000)

if exist
update myNumber set number = number+1 where prefix ="ABC"


How should I write it in SP ??
Thanks a lot
Next
Reply
Map
View

Click here to load this message in the networking platform