Sample Code not working

  • I am ready Inside MS SQl Server 2005: T-SQL Querying and almost all of the cross apply queries involving DMV's do not work...

     

    For example

    Page 58

    SELECT

    qplan.query_plan AS [Query Plan]

    FROM sys.dm_exec_query_stats AS qstats,

    CROSS APPLY sys.dm_exec_query_plan(qstats.plan_handle) AS qplan

     

    Msg 102, Level 15, State 1, Line 3

    Incorrect syntax near '.'.

     

    Thoughts?

  • OK got the answer to my own question

    Note:
    To use APPLY, the database compatibility level must be 90.

Viewing 2 posts - 1 through 1 (of 1 total)

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