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.
Author |
Topic |
ilimax
Posting Yak Master
164 Posts |
Posted - 2008-06-13 : 15:11:12
|
Is there in Transact-SQL something like SELECT CASE in VB or SWITCH in C#.I would like to make stored procedure where I receive paramater then continue .... Something like thisCREATE PROCEDURE SelectMyCase@bla intSELECT CASE @bla Case 0 Update Table1 ... Case 1 Update Table2 Case 2 Insert into table3END SELECT |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-06-13 : 15:14:00
|
You should use IF ELSE IF condition 1 Statement 1ESLE IF condition 1 Statement 2ELSEStatement 3MadhivananFailing to plan is Planning to fail |
 |
|
ilimax
Posting Yak Master
164 Posts |
Posted - 2008-06-13 : 15:59:45
|
Thanks |
 |
|
|
|
|