|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
SELECT INTO From Result SetHi,
We are using SQL Server 2005. Is it possible to fill a temporary table with the result set from a stored procedure? I want to do something like this: SELECT * INTO #Bicycles FROM EXEC(Procedure Name) Jim Jim wrote:
Show quote > Hi, No, you have to create the table first, then> > We are using SQL Server 2005. > > Is it possible to fill a temporary table with the result set > from a stored procedure? I want to do something like this: > > SELECT * > INTO #Bicycles > FROM EXEC(Procedure Name) > > > Jim > INSERT INTO #table EXEC ProcedureName Create the temporary table first.
CREATE TABLE #Bicycles ( col1, col2, etc ) INSERT #Bicycles EXEC ProcedureName; Show quote "Jim" <Jim.Muek***@wellsfargo.com> wrote in message news:1152902093.325403.124060@i42g2000cwa.googlegroups.com... > Hi, > > We are using SQL Server 2005. > > Is it possible to fill a temporary table with the result set > from a stored procedure? I want to do something like this: > > SELECT * > INTO #Bicycles > FROM EXEC(Procedure Name) > > > Jim > |
|||||||||||||||||||||||