Home Forums SQL Server 2005 SQL Server 2005 General Discussion Equivalent of 'DECODE' in sql RE: Equivalent of 'DECODE' in sql
vetrivels
SSC Enthusiast
Points: 101
More actions
July 17, 2008 at 10:17 am
#844521
Rishi,
You can do the same with 'select case...end'
SELECT
CASE
WHEN total > 250 THEN 'pass'
ELSE 'fail'
END as 'status'
FROM student
-Vetri