CHOOSE() – SQL 2012
I was looking at the the SQL 2012 features and one T-SQL feature that attracted me is CHOOSE. DECLARE @RECORDS TABLE(ID INT IDENTITY(1,1),NAME VARCHAR(10),STATUS INT); INSERT INTO @RECORDS(NAME,STATUS) VALUES (‘A’,1), (‘B’,2), (‘C’,2), (‘D’,3); SELECT *, CASE STATUS WHEN 1 THEN ‘Working’ WHEN 2 THEN ‘Resigned’ WHEN 3 THEN ‘InActive’ END… Continue Reading CHOOSE() – SQL 2012