• I have to disagree with you Robert.

    :hehe:Sorry, I looked more closely at the posting and now see that Robert is referring specifically to the use of Single Quotes rather than the general syntax. He is correct. The use of Single Quotes is deprecated and I think it should be.;-)

    I did not find anything in the article you referenced (http://msdn.microsoft.com/en-us/library/ms143729.aspx) to indicate that column aliasing in this fashion is deprecated. I think what is deprecated is omitting the "AS" key word. The syntax <AliasName = Expression> and <Expression AS Alias> is explictly shown in the SQL 2008 syntax diagram for the Select clause.http://msdn.microsoft.com/en-us/library/ms176104.aspx. The use of square brackets or Double Quotes or Single Quotes to delimit the AliasName is required when the name does not follow TSQL naming rules, (e.g., [My Alias Name] or [Object_Id]). I personally prefer the <Alias Name = Expression> version and case statements are a good example of why. I think it simpler and more obvious to see something like this. I find that my application developers have a much easier time following the stored procedure and processing the proper columns this way.

    SELECT

    Name,

    [Sound] = CASE Barks

    WHEN 'True' THEN 'Ruff Ruff'

    ELSE CaseType

    WHEN 'Cat' THEN'Meow'

    WHEN 'Snake' THEN'Hiss'

    WHEN 'Pig' THEN'Oink'

    WHEN 'Monkey' THEN'Eek Eek'

    ELSE ' '

    END

    END

    FROM Pets;