Why null value for any objectid.

  • I am getting null value for following object and many other objects as well (Not for all). The object resides at Adventureworks database.

    select object_id('person.document')

    Can anyone tell me why this is happening 🙁

    -LK

  • Make sure you are running you statement against the right database.

    Use this statement:

    USE Adventureworks

    GO

    select object_id('person.document')

  • luckysql.kinda (9/16/2009)


    I am getting null value for following object and many other objects as well (Not for all). The object resides at Adventureworks database.

    select object_id('person.document')

    Can anyone tell me why this is happening 🙁

    -LK

    I think you have the wrong schema! The only Document table I can find belongs to the Production schema, not Person.

    SELECT OBJECT_ID(N'AdventureWorks.Production.Document')

  • My bad.

    It means object id can never be null.

  • Correct - you should not have a null value for the object id unless you're in the wrong database or have a typo in the schema/object.

Viewing 5 posts - 1 through 4 (of 4 total)

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