Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does it sound OK or there is a better way?
Message
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Does it sound OK or there is a better way?
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01325494
Message ID:
01325494
Views:
57
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
Next
Reply
Map
View

Click here to load this message in the networking platform