November 14, 2007 at 11:57 am
I was wondering if anyone knows if there's a way to capture a resultset other than the 1st that is returned from a stored proc in T-SQL. Basically what I'm trying to do is capture the second result set that is returned from sp_help 'tablename', and store it into a temp table using t-sql.
November 14, 2007 at 12:44 pm
All you are looking for is a list of column names and their definitions correct?
In that case why not use INFORMATION_SCHEMA.COLUMNS. It should have everything you need.
Kenneth FisherI was once offered a wizards hat but it got in the way of my dunce cap.--------------------------------------------------------------------------------For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url]Link to my Blog Post --> www.SQLStudies.com[/url]
November 14, 2007 at 12:49 pm
yah, after i sent this post i realized that I can get my info that way.
In a generic sense (not pertaining to the original problem), is there a way to grab the second table returned from a proc and insert it into a temp table?
November 14, 2007 at 1:05 pm
I could be wrong (and would love to know the solution if there is one) but I think you can only retrieve the last recordset from an SP.
Kenneth FisherI was once offered a wizards hat but it got in the way of my dunce cap.--------------------------------------------------------------------------------For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/[/url]Link to my Blog Post --> www.SQLStudies.com[/url]
November 14, 2007 at 1:20 pm
I know you can do it in ADO, and haven't found anything out there that says that you can do it in T-SQL.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply