Tech Off Post

Single Post Permalink

View Thread: Why doesn't this SQL work?
  • User profile image
    joechung

    Dodo said:
    qwert231 said:
    *snip*

    And I'm not sure why you posted this extremely small screenshot instead of copy'n'pasting the code as text. I tried text detection and sharpening filters on the image and still couldn't read it.
    DB_ID(N'IntranetApps')
    GO

    SELECT * FROM sys.dm_db_index_physical_stats
    (DB_ID(N'IntranetApps'), OBJECT_ID(N'...'), NULL, NULL, 'DETAILED')
    GO

    where ... is the name of an object in his database.

    qwert231, check out example C in DB_ID (Transact SQL) [MSDN].