Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Does it sound OK or there is a better way?
Message
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Does it sound OK or there is a better way?
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01325494
Message ID:
01325494
Vues:
58
Hi everybody,

Just want to verify if the syntax I used is OK or it can be done better (in Update I want to make sure they don't change name accidentally to already existing)

IF EXISTS (SELECT * FROM dbo.Registration WHERE FirstName = @FirstName AND LastName = @LastName
AND SiteID = (select SiteID from Registration where RegistrationID = @RegistrationID) and RegistrationID <> @RegistrationID)

I'm not passing SiteID as a parameter.

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform