Showing posts with label queryi. Show all posts
Showing posts with label queryi. Show all posts

Wednesday, March 7, 2012

Insert Query with stored procedure

Hi,

is it possible to create an "INSERT INTO .... "Select from stored
procedure" Query?

I want to create an temporary table. In this table I want to enter the data,
which I can get from an stored procedure.
But in the FROM-clause a stored procedure is not allowed?"Harald" <yixxu@.yahoo.de> wrote in message news:bfhh70$jt5$1@.online.de...
> Hi,
> is it possible to create an "INSERT INTO .... "Select from stored
> procedure" Query?
> I want to create an temporary table. In this table I want to enter the data,
> which I can get from an stored procedure.
> But in the FROM-clause a stored procedure is not allowed?

Use INSERT INTO/EXEC, e.g.,

INSERT INTO #TempTable (col1, col2, col3)
EXEC MyStoredProcedure 1, 2

Regards,
jag