Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 search all SP and views in a DB

Author  Topic 

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2005-11-21 : 05:00:29
how can i search all the SP and VIEWS
and to check which of them uses a certain table name?
thnajs in advance
peleg

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2005-11-21 : 05:08:29
search thru syscomments text column

example

select *
from sysobjects o inner join syscomments c
on o.id = c.id
where text like '%your_table_name%'

[KH]
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2005-11-21 : 05:35:28
selec distinct object_name(id)
from syscomments
where text like '%your_table_name%'


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -