Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 If condition in SP

Author  Topic 

cplusplus
Aged Yak Warrior

567 Posts

Posted - 2008-07-31 : 22:43:35
What is the best way to write an if for the following:
(@EnterpriseLevelAccess is an INT)

IF @EnterpriseLevelAccess = 1 OR @EnterpriseLevelAccess = 2 OR @EnterpriseLevelAccess = 3

thank you very much for the helpful info.

Vinnie881
Master Smack Fu Yak Hacker

1231 Posts

Posted - 2008-08-01 : 00:14:47
if @EnterpriseLefelAccess in (1,2,3)
begin
print 'Yes'
end
else
begin
Print 'no'
end
Go to Top of Page
   

- Advertisement -