FAQ
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).

Search Discussions

  • Toepke, Kevin M at May 15, 2001 at 7:45 pm
    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).
  • Paul Baumgartel at May 15, 2001 at 8:56 pm
    That's what I figured out while I waited for my email to hit the list!
    Thanks!

    -----Original Message-----
    Sent: Tuesday, May 15, 2001 4:31 PM
    To: Multiple recipients of list ORACLE-L

    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).
    --
    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).

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouporacle-l @
categoriesoracle
postedMay 15, '01 at 7:39p
activeMay 15, '01 at 8:56p
posts3
users2
websiteoracle.com

People

Translate

site design / logo © 2022 Grokbase