﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / T-SQL (SS2K5)  / query on old employee table / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Fri, 24 May 2013 18:04:32 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: query on old employee table</title><link>http://www.sqlservercentral.com/Forums/Topic929050-338-1.aspx</link><description>Thank you very much lowell... :)</description><pubDate>Fri, 28 May 2010 00:38:02 GMT</pubDate><dc:creator>ShekharNaidu</dc:creator></item><item><title>RE: query on old employee table</title><link>http://www.sqlservercentral.com/Forums/Topic929050-338-1.aspx</link><description>another way without the UNION:[code]select   CASE     WHEN manager='Y'    THEN 1     ELSE 2END as myorderBy,name,salary from sometable ORDER BY myorderBy,salary[/code]</description><pubDate>Thu, 27 May 2010 09:14:45 GMT</pubDate><dc:creator>Lowell</dc:creator></item><item><title>RE: query on old employee table</title><link>http://www.sqlservercentral.com/Forums/Topic929050-338-1.aspx</link><description>hey Lowellthat was awe some... thank u very much.. :)</description><pubDate>Thu, 27 May 2010 09:03:40 GMT</pubDate><dc:creator>ShekharNaidu</dc:creator></item><item><title>RE: query on old employee table</title><link>http://www.sqlservercentral.com/Forums/Topic929050-338-1.aspx</link><description>[code]select 1 as myorderBy,name,salary from sometable where manager='Y'UNION ALLselect 2 as myorderBy,name,salary from sometable where manager='N'ORDER BY myorderBy,salary[/code]</description><pubDate>Thu, 27 May 2010 09:00:52 GMT</pubDate><dc:creator>Lowell</dc:creator></item><item><title>query on old employee table</title><link>http://www.sqlservercentral.com/Forums/Topic929050-338-1.aspx</link><description>Hi allone more tricky query I have encountered..(@ an interview)..we have employee table with manager name and salary..now the question is..write a query to display employee records order by salaryand the manager record should be the first record in the result...</description><pubDate>Thu, 27 May 2010 08:58:42 GMT</pubDate><dc:creator>ShekharNaidu</dc:creator></item></channel></rss>