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 Development (2000)
 Reg : Fetching Tables and their details in stored procedure

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-01-18 : 08:58:20
satish writes "Hi,

For my Application i need the following,

To fetching the stored procedures used in the schema.
Thats no problem. I can fetch the stored procedure and its text from the database.

What i actually need is, the details about the tables used and fields in inside the table used and whether the stored procedure is used to select/insert/update or other details.


to be simple.. The table details and fields along with the operation. These details are to be stored as individual fields in my table used to store the result.


Thanks in advance..

Regards,
satish.r"

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-01-18 : 09:54:01
Select P.specific_name, T.table_name from Information_schema.routines P
inner join Information_schema.tables T on P.Routine_definition like '%'+T.table_name+'%'


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

a_r_satish
Yak Posting Veteran

84 Posts

Posted - 2006-01-19 : 08:36:07
Ya thanks That works fine.

What about the Field details and the oeration that are performed in the stored procedure.

Regards,
satish.r

Regards,
satish.r
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-01-19 : 09:12:20
information_Schema.parameters View has those details

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -