text, qs.statement_start_offset / 2,( case when qs.statement_end_offset = - 1 then len(convert(nvarchar(max), qt.text)) * 2 else qs.statement_end_offset end - qs.statement_start_offset ) / 2)) as statement, execution_count FROM sys.dm_exec_query_stats qs outer apply sys.dm_...