Oct 27, 2005 #1 sonname Programmer Joined May 18, 2001 Messages 115 Location US For example something like SELECT CASE @type WHEN 25 THEN exec proc END Or is there something similar like this. I hate to write if statements to do this.
For example something like SELECT CASE @type WHEN 25 THEN exec proc END Or is there something similar like this. I hate to write if statements to do this.
Oct 27, 2005 #2 amrita418 Technical User Joined Mar 9, 2005 Messages 802 Location US No. Use If/Else block to do something like this. Code: Declare @type Int Set @type = 27 If @type = 25 Exec sp_help YourTable Else Print 'Value for Type is ' + Convert(Varchar(5), @type) Regards, AA Upvote 0 Downvote
No. Use If/Else block to do something like this. Code: Declare @type Int Set @type = 27 If @type = 25 Exec sp_help YourTable Else Print 'Value for Type is ' + Convert(Varchar(5), @type) Regards, AA