Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Sql Server Programming

Return table from Stored Procedure into another stored procedure


hi,
can this be done?
i have stored procedure 1 that calls stored procedure 2 in the FROM clause.  
Stored procedure 2 is supposed to return a table.
For example:
select a, b, c
from
table1 ,
(exec storedproc2) table2
where
a = b and.....

please advise

No, that is not possible.  You can exec stored proc 2 and store the results
in a temp table or table var and then join onto that.  If you can modify
stored proc 2 and convert it into a UDF, you may be able to join onto that
as an alternative.

--
   Tom

----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON   Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau

"R C" <R@discussions.microsoft.com> wrote in message

news:F059B7F7-623E-4C44-B26C-51DBA0174DBE@microsoft.com...
hi,
can this be done?
i have stored procedure 1 that calls stored procedure 2 in the FROM clause.
Stored procedure 2 is supposed to return a table.
For example:
select a, b, c
from
table1 ,
(exec storedproc2) table2
where
a = b and.....

please advise

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc