Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to insert multiple rows into nested table

858733Apr 29 2011 — edited May 1 2011
Hi
i have a problem about how to insert bulk of records into nested table.

the Structure is like that
create or replace type bidtype as object
( B_BIDDINGTYPE VARCHAR2(15),
B_TIME DATE,
B_PRICE NUMBER)
/

create or replace type bidtype_table as table of bidtype
/

create or replace type biddingtype as object
(B_AUCTIONKEY VARCHAR2(30),
B_USERNAME VARCHAR2(30),
I_ITEMKEY vARCHAR2(30),
b_time date,
bidtp_link bidtype_table)
/

there is a table with data name bidding in another account, the structure is relation table, and the attributes are
(B_AUCTIONKEY NOT NULL VARCHAR2(30)
B_USERNAME NOT NULL VARCHAR2(30)
B_BIDDINGTYPE VARCHAR2(15)
B_TIME NOT NULL DATE
B_PRICE NUMBER)

how to populate data into bidtp_link? i
INSERT INTO THE
(SELECT bidtp_link
FROM bidding
WHERE b_aucitonkey = 'abcdefg'
VALUES ('',,);//this is only for specified records

in relationship db you can insert multiple rows by
insert into tablename
select * from another_tablename;
how to do the same thing in object table?
thanks

Edited by: 855730 on 2011-4-29 下午5:56
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 29 2011
Added on Apr 29 2011
2 comments
2,020 views