Re: Populate table with resultset from a Stored program call

From: Jim Kennedy <kennedy-family_at_attbi.com>
Date: Tue, 19 Nov 2002 13:15:45 GMT
Message-ID: <5QqC9.82518$QZ.12381_at_sccrnsc02>


You can use a function that returns a ref cursor. (see docs). I would suggest that you should specify the column names and not doing it as you suggest. (relying on the order of the columns in the table and the ref cursor being in a particular non-specified order.) eg
insert into tablename(col1,col2,...) as select my_function_that_returns_ref_cursor( my args) from dual; (should work, haven't tested it.)
If you are planning to use temp tables like you do in SQL Server you probably don't in Oracle. If you really really feel you just gotta have'em then look up global temporary tables.
Jim
"Gary M Cabana" <gcabana_at_gis.net> wrote in message news:5c5ced77.0211190426.604796bb_at_posting.google.com...
> SQL Server has the statement
>
> INSERT INTO tablename
> EXEC spName
>
> Can this be done in Oracle without using dynamic sql?
>
> thanks in advance!!
Received on Tue Nov 19 2002 - 14:15:45 CET

Original text of this message