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 2000 Forums
 SQL Server Development (2000)
 Complicated If | Else within an SP

Author  Topic 

daniel.newman@bis-web.net
Yak Posting Veteran

71 Posts

Posted - 2001-05-23 : 11:48:32
I'm trying to see if this is possible, but the best example with BOL is for one If, and one Else. I'm going to need 4 different actions depending on the value of one of the Parameters.

I want to do a simple Select Case, but that doesn't look possible in T-SQL, so how can I build an If statement that has four outcomes?

Something like:

IF @Interest = 1
ELSE IF @Interest = 2
ELSE IF @Interest = 3
ELSE IF @Interest = 4

Is this possible?
   

- Advertisement -