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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 what is wrong with this piece of code?

Author  Topic 

jeff06
Posting Yak Master

166 Posts

Posted - 2007-02-07 : 10:08:29
select sub1.*, case sub1.mdiff when sub1.mdiff<12 then 1 else 0 end as flag

error msg by query analyser
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near '<'.
Server: Msg 156, Level 15, State 1, Line 12
Incorrect syntax near the keyword 'as'.


Thanks

Jeff

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-02-07 : 10:09:33
select sub1.*, case sub1.mdiff when sub1.mdiff<12 then 1 else 0 end as flag



KH

Go to Top of Page

jeff06
Posting Yak Master

166 Posts

Posted - 2007-02-07 : 10:12:36
THANK YOU VERY MUCH.

Go to Top of Page
   

- Advertisement -