You have to have 1 collection (index by table) per column. In your example,
you would need to have 3 index by tables:
    v_order_event_id    message_contentorder_event_id%TYPE
        INDEX BY BINARY_INTEGER;
    v_message_field_id  message_field_id%TYPE
        INDEX BY BINARY_INTEGER;
    v_message_content   message_content%TYPE
        INDEX BY BINARY_INTEGER;

FORALL i in 1..fcount
  insert into message_content values (v_order_event_id(i),
                                      v_message_field_id(i),
                                      v_message_content(i));

Kevin
-----Original Message-----
Sent: Tuesday, May 15, 2001 3:23 PM
To: Multiple recipients of list ORACLE-L


I am trying, for the first time, to use bulk binding on insert.

Assuming I have a type defined as MESSAGE_CONTENT%ROWTYPE INDEX BY
BINARY_INTEGER, and a variable, v_message_content, of that type:  I've tried
the insert as

FORALL i in 1..fcount
  insert into message_content values (v_message_content(i));

which gives "expression is of wrong type".

I also tried

FORALL i in 1..fcount
  insert into message_content values (v_message_content(i).order_event_id,
                                      v_message_content(i).message_field_id,
                                      v_message_content(i).message_content);

which gives "implementation restriction:  cannot reference fields of BULK
In-BIND table of records".



So, how *is* it done?  

TIA,

Paul Baumgartel
InstiPro Group, Inc.
[EMAIL PROTECTED]
212 813-0829 x103


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Paul Baumgartel
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Toepke, Kevin M
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to