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)
 Store Meta Data

Author  Topic 

PaulTeal
Yak Posting Veteran

67 Posts

Posted - 2003-10-20 : 14:43:53
I am trying to insert some meta data into a temporary table:

USE master
CREATE TABLE #TempTable ([name] VARCHAR (30), fileid INT, [filename] VARCHAR (30), [filegroup] VARCHAR (30), [size] VARCHAR (30), [maxsize] VARCHAR (30), growth VARCHAR (30), usage VARCHAR (30))
INSERT #TempTable EXEC SP_HELPDB master
SELECT * FROM #TempTable
DROP TABLE #TempTable

But the insert fails because the system stored procedure returns two result sets. How do I differentiate between the two result sets for the insert?

Paul Teal
paul@partytilyoupop.com

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-10-20 : 14:46:14
Well you can't. You'll need to write your own custom stored procedure that gets the information that you need. Just have a look at what sp_helpdb does and grab what you need from it.

Tara
Go to Top of Page
   

- Advertisement -