Showing posts with label exec. Show all posts
Showing posts with label exec. Show all posts

Friday, March 30, 2012

How to insert resultset from SP into a table? or use Select * From

I tried this (and other variations) in Query Analyzer - which did not work.
select * from (exec stp_Report_MonthlyCountHistory_Summary '24', '%',
'3/13/06', '3/13/06')
Is there a way to Select/insert the resultset from an SP? How to do this?
Thanks,
RichRich,
Create a temporary or permanent table with the same structure as the result
of the sp. Use:
insert into #t1
exec dbo.usp_p1 ...
AMB
"Rich" wrote:

> I tried this (and other variations) in Query Analyzer - which did not work
.
> select * from (exec stp_Report_MonthlyCountHistory_Summary '24', '%',
> '3/13/06', '3/13/06')
> Is there a way to Select/insert the resultset from an SP? How to do this?
> Thanks,
> Rich
>

Friday, March 23, 2012

How to incorporate exec sql describe select list

Hi,

What is the "EXEC SQL DESCRIBE SELECT LIST" equavilent in .NET using MS SQL Server?

Thanks in advance.If this gets the metadata of the result then you can just look at the SqlDataReader object returned by calling ExecuteReader for example. There are many ways to do this depending on your requirements. Check out the .NET SDK on SqlCommand object for some examples.