how to use oracle package to get rid of Global Temp table

Posted by john on Stack Overflow See other posts from Stack Overflow or by john
Published on 2010-06-13T15:19:43Z Indexed on 2010/06/13 15:22 UTC
Read the original article Hit count: 161

Filed under:
|
|

I have a sample query like below:

INSERT INTO my_gtt_1 (fname, lname) (select fname, lname from users)

In my effort to getting rid of temporary tables I created a package:

create or replace package fname_lname AS

Type fname_lname_rec_type is record (
fname varchar(10),
lname varchar(10)
);

fname_lname_rec fname_lname_rec_type

Type fname_lname_tbl_type is table of fname_lname_rec_type;

function fname_lname_func
(
   v_fnam in varchar2, 
   v_lname in varchar2
)return fname_lname_tbl_type pipelined;

being new to oracle...creating this package took a long time. but now I can not figure out how to get rid of the my_gtt_1

how can i say...

INSERT INTO <newly created package> (select fnma, name from users)

© Stack Overflow or respective owner

Related posts about Oracle

Related posts about plsql