Showing posts with label generated. Show all posts
Showing posts with label generated. Show all posts

Wednesday, March 28, 2012

How to save the SP result?

Hi!
How can i save the resultant recordset generated by an Stored Procedure to
another table (with the same structure) ?
I think its some like INSERT * INTO tmptable FROM **Exec mySProc**
Can you help my?
Thanxs, Gabriel.Hi Gabriel
You're close...
You just don't need the * or the FROM.
Make sure the Stored Proc only returns one set of rows.
INSERT INTO tmptable
EXEC myProc
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Gabriel South" <gsouth@.hotmail.com> wrote in message
news:Ore5y9iBFHA.2984@.TK2MSFTNGP11.phx.gbl...
> Hi!
> How can i save the resultant recordset generated by an Stored Procedure to
> another table (with the same structure) ?
> I think its some like INSERT * INTO tmptable FROM **Exec mySProc**
> Can you help my?
> Thanxs, Gabriel.
>
>

Wednesday, March 7, 2012

How to retrieve the SQL query generated by processing a cube in ASSAS

I have seen several posts which talk about looking at the underlying SQL for a cube in SQL Server 2005, but I have been unable to locate where you can do this. When I process my cube I do not see any SQL in the Process progress dialog box in the way you do with AS2000.

I have tried running SQL profiler while processing but that didn't give anything either.

Could someone help me out please?

Thanks

In the processing progress dialog box, you should be able to expand the items listed and eventually get down to the detail of the SQL queries generated and executed.

However, I find that using SQL Server Profiler works better if your source for the SSAS database is a SQL Server database. When you use Profiler, you need to profile the SQL Server database, not the SSAS database. Profiling the SQL Server database should show the queries hitting the database.

HTH,

Dave Fackler