mcfarlandparkway - Wednesday, February 22, 2017 5:19 PM
Your UNION query, as you can see if you run it, will give both values you want in a one-column output.
A sneaky way to do it is
SELECT MAX(CASE col1 WHEN 'Emp' THEN col2 ELSE NULL END) as EmpCol2,
MAX(CASE col1 WHEN 'Std' THEN col2 ELSE NULL END) as StdCol2
FROM table
Note things can get wonky if you have more than one of either/both values in the table.
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service