Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: FORALL / bulk bind insert

RE: FORALL / bulk bind insert

From: Toepke, Kevin M <ktoepke_at_cms.cendant.com>
Date: Tue, 15 May 2001 12:45:33 -0700
Message-ID: <F001.0030419E.20010515123120@fatcity.com>

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.
paul.baumgartel_at_instipro.com
212 813-0829 x103

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Paul Baumgartel
  INET: PaulB_at_instipro.com

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: ListGuru_at_fatcity.com (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: ktoepke_at_cms.cendant.com
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: ListGuru_at_fatcity.com (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). Received on Tue May 15 2001 - 14:45:33 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US