Thursday, October 7, 2010

Find in Syscomments

SELECT so.name
, so.crdate
, sc.text
FROM sysobjects so
JOIN syscomments sc
ON so.id = sc.id
WHERE so.type = 'p'
AND sc.text LIKE '%insert%select%*%'
ORDER BY so.crdate DESC

No comments: