Warning: session_start() expects parameter 1 to be array, string given in /home/sqlthoug/public_html/blog/wp-includes/class-wp-hook.php on line 287
August 2013 – SQL Thoughts

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