Quantcast
Channel: Substring In Sql | Automatic Website Traffic RSS
Viewing all articles
Browse latest Browse all 989

Query plan returns NULL when using SQL Server DMV sys.dm_exec_query_plan

$
0
0
Below, I have an alternative script to get the cached plan. SELECT (SELECT TOP 1 SUBSTRING(sql_text.text,statement_start_offset / 2+1 , ((CASE WHEN statement_end_offset = -1 THEN (LEN(CONVERT(nvarchar(max),sql_text.text)) * 2) ELSE statement_end_offset END ...

Viewing all articles
Browse latest Browse all 989

Trending Articles