Table Names in 2 Part Naming Convention in Select List

  • Gosh... I must be losing my marbles. I'm trying to prove to my new boss that the use of table names in 2 part naming in the SELECT list has been deprecated. I was sure that I saw it in the deprecation list for 2008 (non-R2) about a year (maybe more) ago. No, after goiing over the deprecation list again and again, I find no such thing and I'm really sure it used to be there.

    Does anyone else remember this particular deprecation?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • These are the only two I can find (2008-2012):

    SELECT *

    FROM sys.dm_os_performance_counters AS dopc

    WHERE dopc.object_name LIKE N'%:Deprecated Features%'

    AND dopc.instance_name LIKE N'%part%';

    Perhaps you were thinking of the 'more than two-part name' one? For example, this query increments the counter:

    SELECT Production.Product.ProductID

    FROM Production.Product;

    SQL Server, Deprecated Features Object

  • Thanks, Paul...

    The deprecation that I remember was based on using table names instead of alias names for column callout in the SELECT list. Like this...

    SELECT TableName.SomeColumnName

    FROM dbo.TableName

    The recommendation was to use a table alias instead of the table name in the select list (of course, you'd need to add the alias in the FROM clause, as well).

    I know about the deprecation on 3 and 4 part naming conventions and haven't gotten those confused here.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Jeff Moden (1/26/2012)


    The deprecation that I remember was based on using table names instead of alias names for column callout in the SELECT list. Like this...

    SELECT TableName.SomeColumnName

    FROM dbo.TableName

    The recommendation was to use a table alias instead of the table name in the select list (of course, you'd need to add the alias in the FROM clause, as well).

    Hm, well as far as I know, that syntax is in the SQL standard, so unlikely to be deprecated in SQL Server.

  • SQL Kiwi (1/26/2012)


    Jeff Moden (1/26/2012)


    The deprecation that I remember was based on using table names instead of alias names for column callout in the SELECT list. Like this...

    SELECT TableName.SomeColumnName

    FROM dbo.TableName

    The recommendation was to use a table alias instead of the table name in the select list (of course, you'd need to add the alias in the FROM clause, as well).

    Hm, well as far as I know, that syntax is in the SQL standard, so unlikely to be deprecated in SQL Server.

    Agreed... that's why I'm thinking it's no longer on the deprecation list but I really do remember seeing it there about a year ago. I'm just trying to find someone besides me who remembers seeing it.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Jeff Moden (1/26/2012)


    Agreed... that's why I'm thinking it's no longer on the deprecation list but I really do remember seeing it there about a year ago. I'm just trying to find someone besides me who remembers seeing it.

    I would ask the question on the MVP DL; I expect UC would be able to offer a definitive answer.

  • Good idea, Paul. Thanks.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply