Re: Populate table with resultset from a Stored program call
From: Jusung Yang <JusungYang_at_yahoo.com>
Date: 19 Nov 2002 13:52:40 -0800
Message-ID: <130ba93a.0211191352.53672de6_at_posting.google.com>
Date: 19 Nov 2002 13:52:40 -0800
Message-ID: <130ba93a.0211191352.53672de6_at_posting.google.com>
You can try "TABLE Function". The SQL will look like
insert into destination_table_name
select * from table(table_function_name);
Basically you create a VARRAY or Nested Table type, create a function that returns a collection of that type, do whatever you want in the function to populate the collection variable and then use the "TABLE()" in your SQL to get the resultset returned from the function.
- Jusung Yang
gcabana_at_gis.net (Gary M Cabana) 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 - 22:52:40 CET