Oct 27, 2005 #1 sonname Programmer May 18, 2001 115 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 Mar 9, 2005 802 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