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 |
|
dnf999
Constraint Violating Yak Guru
253 Posts |
Posted - 2007-03-21 : 08:38:24
|
| Please help:select case when (PROJ_LOC_1 = 'N/A' then '' else PROJ_LOC_1) as PROJ_LOC_1from TableError:Msg 156, Level 15, State 1, Line 2Incorrect syntax near the keyword 'then'.I just want to PROJ_LOC_1 to display blank if equal to N/AThanks! |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2007-03-21 : 08:39:39
|
| remove the parens, add "end" :case when PROJ_LOC_1 = 'N/A' then '' else PROJ_LOC_1 end as PROJ_LOC_1When in doubt, check the syntax in Books On Line. (the SQL Server help files)- Jeffhttp://weblogs.sqlteam.com/JeffS |
 |
|
|
|
|
|