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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 CASE function question...

Author  Topic 

obiwaugh
Starting Member

27 Posts

Posted - 2004-12-29 : 16:12:38
How do I do this? I'm not sure about the syntax....

CASE JOB.ANNUAL_RT
WHEN > 50000
THEN 'GROUP 1'
ELSE 'GROUP 2'
END

I know enough to know that I don't know enough.

nr
SQLTeam MVY

12543 Posts

Posted - 2004-12-29 : 16:18:17

select
CASE
WHEN JOB.ANNUAL_RT > 50000
THEN 'GROUP 1'
ELSE 'GROUP 2'
END
from JOB

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -