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 |
|
PeeJay2583
Starting Member
40 Posts |
Posted - 2011-05-19 : 08:23:28
|
| I am using a query to select one column from a table using if condition as there are many SNO# in the table however getting an error.Msg 156, Level 15, State 1, Line 1Incorrect syntax near the keyword 'If'.Msg 102, Level 15, State 1, Line 1Incorrect syntax near ','.Query I am using is -select If(Left([SNo#],1)="4","4-" + Right([SNo#],5),[SNo#]) AS SNo# from Sheet2$ |
|
|
raghuveer125
Constraint Violating Yak Guru
285 Posts |
Posted - 2011-05-19 : 08:34:41
|
| You are running this on MSSQL?In Love... With Me! |
 |
|
|
PeeJay2583
Starting Member
40 Posts |
Posted - 2011-05-19 : 08:46:33
|
| YesMukesh Sajjan |
 |
|
|
|
|
|