• I get this error when creating the SP: Msg 102, Level 15, State 1, Procedure dba_WhatSQLIsExecuting, Line 42 Incorrect syntax near '.'.

    Line 42 is the 'CROSS APPLY' line.

    Can anyone help?