Home Forums SQL Server 2014 Development - SQL Server 2014 Identify objects that do not use an Identity Column but a Lookup Table to generate an Unique Identifier RE: Identify objects that do not use an Identity Column but a Lookup Table to generate an Unique Identifier

  • John Mitchell-245523 - Monday, January 23, 2017 9:41 AM

    Welsh Corgi - Monday, January 23, 2017 9:31 AM

    John Mitchell-245523 - Monday, January 23, 2017 8:55 AM

    Welsh Corgi - Monday, January 23, 2017 8:33 AM

    How should I modify this query to identify the table name?


    SELECT name

    FROM sys.procedures

    WHERE Object_definition(object_id) LIKE '%LastIDNumber%'

    ORDER BY Name

    Thank you.

    That's not a reliable way to identify dependencies.  What happens if the object name appears commented out, or enclosed in quotes, in the stored procedure definition?  You should listen to Lowell's advice earlier in this thread.

    John

    I have already confirmed that there is not an issue with the object name being commented out or enclosed in quotes.

    I was told that the query listed above is exactly what they needed.

    Thank you so much for the help that you provided me. -:)

    Maybe you wrote in invisible ink.  How do you know there is no issue?  And even if you do, how do you know there won't be in the future?

    Who told you that the query is what they needed (and who are "they")?  Just because someone tells you something, it doesn't necessarily mean it's right.  Listen to good advice when it's offered.  And good luck - I'm out.

    John

    I beg you pardon but I do not believe I got a simple query that includes the Stored Procedure name and Table name?

    Thank you.

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/