Re: Bulk Insert
From: The Magnet <art_at_unsu.com>
Date: Thu, 16 Jun 2011 12:04:13 -0700 (PDT)
Message-ID: <2ae2bb88-eaf9-4483-bf24-162106952110_at_35g2000prp.googlegroups.com>
On Jun 15, 4:09 pm, joel garry <joel-ga..._at_home.com> wrote:
> 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 andhttp://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...
Date: Thu, 16 Jun 2011 12:04:13 -0700 (PDT)
Message-ID: <2ae2bb88-eaf9-4483-bf24-162106952110_at_35g2000prp.googlegroups.com>
On Jun 15, 4:09 pm, joel garry <joel-ga..._at_home.com> wrote:
> 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 andhttp://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...
Did not really get a working version going. But I'll check the site and if he says it can be done, then it is only a matter of trial and error until it works...... Received on Thu Jun 16 2011 - 14:04:13 CDT