I have run this query with and without the LEN() on b.text the result that come back I can see the query that I executed but it cuts off at ~ 51k characters what can I do to get the full text of the query?
SELECT
a.last_execution_time AS ExectuionTime,
LEN(b.text) AS Query
FROM
sys.dm_exec_query_stats a
CROSS APPLY
sys.dm_exec_sql_text(a.sql_handle) b
WHERE
b.text LIKE '%FLC%'
AND a.last_execution_time BETWEEN '2016-04-05 15:00:00' AND '2016-04-05 15:30:00'
ORDER BY
a.last_execution_time DESC
**Edit Thanks to all for your help following the link supplied by Gordon I was able to get to this. The xml contained the entire query. Again thank you all for the input.
SELECT
CAST('<root><![CDATA[' + b.text + ']]></root>' AS XML)
FROM sys.dm_exec_query_stats a
CROSS APPLY sys.dm_exec_sql_text(a.sql_handle) b
WHERE
b.text like '%FLC%'
AND a.last_execution_time BETWEEN '2016-04-05 15:00:00' AND '2016-04-05 15:30:00'
ORDER BY a.last_execution_time DESC