SELECT 
           DISTINCT o.name, o.xtype
FROM
         syscomments c
INNER JOIN
sysobjects o
ON c.id=o.id
WHERE c.TEXT LIKE '%YEAR(payfrom)%'

Comments (0)