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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2004-05-18 : 08:27:41
|
| Clint writes "How do you make a SELECT statement that uses a boolean to select two different strings?In Access it would be:SELECT IIF(MyBoolean, MyTrueString, MyFalseString) FROM MyTableBut how do you do the equivalent in MSDE/SQL Server?Thanks,Clint" |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2004-05-18 : 08:31:17
|
| SELECT CASE WHEN column1 = this THEN this ELSE that END FROM TableMeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
|
|
|