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)
 stored proc calls non-existent table

Author  Topic 

rb1373
Yak Posting Veteran

93 Posts

Posted - 2005-05-09 : 17:28:04
I just found a stored procedure that references a non-existent table. Is there a way to find more stored procedures, views, triggers with a similar problem?

Thanks,
Ray

nr
SQLTeam MVY

12543 Posts

Posted - 2005-05-14 : 17:06:48
Only by executing them.

==========================================
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

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2005-05-15 : 22:24:52
you could extract the tables being used by those objects by using select on syscomments,then compare with the existing tables ?

haven't tried this but it's an idea you could explore

--------------------
keeping it simple...
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2005-05-15 : 22:32:15
You could try that but it's not easy - need to cope with all the different ways or referencing tables and entries going over a page. And you will still only get first level dependencies.

==========================================
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 -