SQL Server - Switch case in stored procedure - Asked By Kiran Babu Talluri on 13-Jul-06 06:13 AM

Hi ,
  Can i have the syntax of switch case in swl server 2005 stored procedures

Case syntax - Asked By mv ark on 13-Jul-06 06:33 AM

Sample from SQL Server 2005 Books Online - http://msdn2.microsoft.com/en-us/library/ms181765.aspx 

USE AdventureWorks;
GO
SELECT   ProductNumber, Category =
      CASE ProductLine
         WHEN 'R' THEN 'Road'
         WHEN 'M' THEN 'Mountain'
         WHEN 'T' THEN 'Touring'
         WHEN 'S' THEN 'Other sale items'
         ELSE 'Not for sale'
      END,
   Name
FROM Production.Product
ORDER BY ProductNumber;
GO
anuj kumar replied to Kiran Babu Talluri on 05-Apr-12 10:01 AM
i have not seen this kind of worst site ever . stop irritating people please.