Re: Bulk Insert
From: joel garry <joel-garry_at_home.com>
Date: Wed, 15 Jun 2011 14:09:07 -0700 (PDT)
Message-ID: <a80699c4-5003-49f4-b303-a31261f7bd97_at_p9g2000prh.googlegroups.com>
On Jun 14, 1:39 pm, The Magnet <a..._at_unsu.com> wrote:
> There is no real documentation that I can find on this, so here goes
> the question. Can I combine a FORALL ... INSERT with a nested table?
>
> Say I have this code:
>
> OPEN ticker_detail;
> FETCH ticker_detail BULK COLLECT INTO v_read_record;
> CLOSE ticker_detail;
> .
> .
> .
> FORALL y IN v_read_record.FIRST .. v_read_record.LAST
> INSERT INTO stock_info_snapshot VALUES v_read_record(y);
Date: Wed, 15 Jun 2011 14:09:07 -0700 (PDT)
Message-ID: <a80699c4-5003-49f4-b303-a31261f7bd97_at_p9g2000prh.googlegroups.com>
On Jun 14, 1:39 pm, The Magnet <a..._at_unsu.com> wrote:
> There is no real documentation that I can find on this, so here goes
> the question. Can I combine a FORALL ... INSERT with a nested table?
>
> Say I have this code:
>
> OPEN ticker_detail;
> FETCH ticker_detail BULK COLLECT INTO v_read_record;
> CLOSE ticker_detail;
> .
> .
> .
> FORALL y IN v_read_record.FIRST .. v_read_record.LAST
> INSERT INTO stock_info_snapshot VALUES v_read_record(y);
That's out of my experience, but a quick google says you can according to Steven Feuerstein and http://tonguc.wordpress.com/2007/02/25/oracle-best-practices-part-2/
Didn't notice any actual examples though.
>
> If stock_info_snapshot contains a nested table, can this or will this
> work?
Does it give you an error?
jg
-- _at_home.com is bogus. http://www.signonsandiego.com/news/2011/jun/13/san-diego-couple-loses-13000-grandparent-scam/Received on Wed Jun 15 2011 - 16:09:07 CDT