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 |
|
verinow_mark
Starting Member
2 Posts |
Posted - 2006-05-04 : 17:11:12
|
| In some languages you can do something like:x = 2DO CASECASE x =1 do somethingCASE x =2 do something -- this would runCASE x =3 do somethingENDCASEWhat is similiar in T-SQL? Thanks. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-05-04 : 17:14:32
|
| T-SQL has a CASE statement. Check out CASE in SQL Server Books Online for more details.Tara Kizeraka tduggan |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2006-05-04 : 17:15:08
|
| IF...ELSE...ELSE IF. SQL has a CASE expression, but it does not control program flow. Only IF can do that. |
 |
|
|
|
|
|