Can some one give an example how can i use sys.dm_exec_text_query_plan ( plan_handle , statement_start_offset ,statement_end_offset) .
As per BOL One plan is generated for each batch that contains, for example ad hoc Transact-SQL statements, stored procedure calls, and user-defined function calls.
Which means if i run a stored proc with nested queries or CTE i will only have one consolidated plan generated.
Mohd Sufian www.sqlship.wordpress.com Please mark the post as Answered if it helped.
View Complete Post