Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check record and insert
Message
De
05/10/2007 02:12:37
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Titre:
Check record and insert
Divers
Thread ID:
01258809
Message ID:
01258809
Vues:
49
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform