Loading ...
Sorry, an error occurred while loading the content.

Re :MUGH-SQLCON How to get Table/View names used in an SP, or, SP's that have a Table/View refer

Expand Messages
  • ravindhar Bonagiri
    Hi Chakradhar,Hope this helps:Q1:Help on getting all those table/views names that were being used in a SP ?A1: Stored procedure body will be stored in
    Message 1 of 1 , Mar 25 11:06 AM
    • 0 Attachment
      Hi Chakradhar,Hope this helps:Q1:Help on getting all those table/views names that were being used in a SP ?A1: Stored procedure body will be stored in syscomments table.So you can query against that table to get data.      Ex: Select  text  from syscomments where text like '%<your  table/view name>%' Q2:help on getting all those SP names that use a particular Table/view ?A2: Below link will gives you the required information.      (Though it is Sybase one,works good for SQL Server, as SQL server is evolved from Sybase.)         http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ase_15.0.sprocs/html/sprocs/sprocs68.htmHappy Programming !Thanks,RaviOn Mon, 24 Mar 2008 09:38:56 -0000 sqlcon@yahoogroups.com wroteHiI wonder, is there any help on getting all those table/views names that were being used in a SP. Let the tables be used for Select, Insert, Update... what ever.Similarly, is there any help on getting all those SP names that use a particular Table/view.Can anybody throw some light on this.Thanks & RegardsChakradhar

      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.