Tuesday, January 4, 2011

Finding text for tables and procdures

---------finding text in PROCEDURES

select distinct o.name,o.xtype from syscomments s
inner join sysobjects o on s.id=o.id where s.text like '%screenid%'



---------finding columns in TABLES

SELECT T.NAME,C.NAME  FROM SYS.TABLES T
INNER JOIN SYS.COLUMNS C ON
T.OBJECT_ID=C.OBJECT_ID
WHERE C.NAME LIKE '%screenid%'

No comments:

Post a Comment