Viewing 15 posts - 2,491 through 2,505 (of 6,486 total)
You would have to insert the output of the inner SP into a temp table, and then access the temp table.
Something like:
create proc myoutperproc()
as
begin
.....
INSERT #MyTempTable
Exec MyInnerProc
Select...
October 1, 2008 at 3:27 pm
It never gets that far. The error you're seeing happens before you even get to the GOTO.
Since you're in 2005 - you REALLY should try the NEW way to...
September 30, 2008 at 5:43 pm
Fraggle (9/30/2008)
September 30, 2008 at 5:00 pm
What's the clustered index on this table? None of these are.
September 30, 2008 at 3:06 pm
I disagree with Fraggle - I haven't seen PIVOT generate any perf gains. As a matter of fact - given its limitations, it really hasn't been of much use,...
September 30, 2008 at 3:05 pm
Perry Whittle (9/30/2008)
Matt Miller (9/30/2008)
September 30, 2008 at 2:29 pm
Clay.Angelly (9/30/2008)
@GSquared: Thank you, great info there.@GilaMonster: Yes, the particular example we're focusing on anyway...has gone from ~50ms execution times to ~1.5 minutes since the migration to SS2005.
You might care...
September 30, 2008 at 1:32 pm
Actually - it's deprecated. Right now. If you try that syntax against a SQL Server 2005 or higher, with compatibility @ 90 or above, you get:
Msg 4147, Level...
September 30, 2008 at 1:28 pm
The sub-query needs a GROUP BY clause. As in -
UPDATE OrderDetails
SET
ShipID...
September 30, 2008 at 1:08 pm
Agreed - it looks to be fairly accurate. Considering he does try to run the stuff in 2005 at the end - he didn't mention that SQL 2005 can...
September 30, 2008 at 1:06 pm
rbarryyoung (9/30/2008)
The other problem with both of these tricks is that they rely on creating and using a second SQL process thus fooling SQL Server about the...
September 30, 2008 at 12:54 pm
Yup I have.
I haven't yet managed to get SYSTEM stored procs to work this way, but that's something having to do with OPENQUERY (it just keeps telling me...
September 30, 2008 at 12:26 pm
All right - no problems:
Assume a stored proc like the following:
Create PROCEDURE matt
AS
BEGIN
SET NOCOUNT ON;
SELECT top 20 * into #matttbl
from Tally
select * from #matttbl
END
(not incredibly smart, but it does...
September 30, 2008 at 12:01 pm
If you allow for using OPENQUERY, it gets a whole lot easier....
Again - just like michael mentioned - it's a bad idea. But you can do it under some...
September 30, 2008 at 11:47 am
If by "work space you don't get back", you mean "space that is used temporarily, marked as free in the data file once completed, to be used in the future...
September 30, 2008 at 10:30 am
Viewing 15 posts - 2,491 through 2,505 (of 6,486 total)