SELECT?*?from?(
SELECT?qs.creation_time?AS?time,
???????SUBSTRING(qt.text,?(qs.statement_start_offset/2)?+?1,?((CASE?WHEN?qs.statement_end_offset?=?-1?THEN?DATALENGTH(qt.text)?ELSE?qs.statement_end_offset?END?-?qs.statement_start_offset)/2)?+?1)?AS?sqltext
FROM?sys.dm_exec_query_stats?AS?qs
CROSS?APPLY?sys.dm_exec_sql_text(qs.sql_handle)?AS?qt
)?as?t
where?t.sqltext?like?'%UPDATE?SC_DTCPJL_MES?SET%'
order?by?t.time?desc?