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)
 How to query the result of a system procedure sp_?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-04-23 : 12:57:27
Paul writes "How do I query the result of a system procedure?

Example
use pubs
EXEC sp_column_privileges 'Authors'

I need to query the result?"

Radhika
Starting Member

15 Posts

Posted - 2002-04-23 : 13:41:17
The method to query the result of the system stored procedure can be by creating a Temporary table in your stored procedure and inserting the result of the system SP to the Temp table and then the further querying can be done against the Temporary table.
for E.g.:
Create table #Temp (TABLE_QUALIFIER VarChar(50),TABLE_OWNER VarChar(15),TABLE_NAME VarChar(25),COLUMN_NAME VarChar(25), GRANTOR VarChar(12),GRANTEE VarChar(32), PRIVILEGE VarChar(32),IS_GRANTABLE VarChar(5))

Insert into #Temp
exec sp_column_privileges 'ReportInfo'

select * from #Temp


Go to Top of Page
   

- Advertisement -