• When I executed sp, i got following error

    -------------------

    Msg 102, Level 15, State 1, Line 35

    Incorrect syntax near '.'.

    Msg 102, Level 15, State 1, Line 35

    Incorrect syntax near 'B'.

    Msg 102, Level 15, State 1, Line 35

    Incorrect syntax near 'Y'.

    ----------------

    When Isolated problem, found out the line raising this error is

    ISNULL ((SELECT [text] FROM master.sys.dm_exec_sql_text (SP.sql_handle)),'') AS SQL_Statement

    After further exploration found out underlaying error is

    Msg 321, Level 15, State 1, Line 1

    "sql_handle" is not a recognized table hints option. If it is intended as a parameter to a table-valued function, ensure that your database compatibility mode is set to 90.

    I have SQL 2005 running mode 8, is there equalent to sql_handle which i can use in my enviornment?

    Thanks