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)
 Getting column name from view referenced by view

Author  Topic 

sanjnep
Posting Yak Master

191 Posts

Posted - 2007-05-02 : 10:33:08
I have two views sss_CallLegs on database p_fsssdb1 and Calls_fct on database p_frtsdb1. View Calls_fct is based on view sss_CallLegs. How can I find the columns that is using by the view Calls_fct?

I used sp_depends Calls_fct and it gives the result:
Object does not reference any object, and no objects reference it.

but p_frtsdb1.dbo.Calls_fct is referenced by view p_fsssdb1.dbo.sss_CallLegs

Thanks

mcrowley
Aged Yak Warrior

771 Posts

Posted - 2007-05-02 : 11:16:04
sp_depends will not work for cross-database dependencies. You will have to do this the old fashioned way, and use sp_helptext. Besides, sp_depends would not tell you if the outer view is doing calculations on the inner view's columns, or if it is showing raw data.
Go to Top of Page
   

- Advertisement -