dbTalk Databases Forums  

Bulk Insert

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Bulk Insert in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
The Magnet
 
Posts: n/a

Default Bulk Insert - 06-14-2011 , 03:39 PM






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

If stock_info_snapshot contains a nested table, can this or will this
work?

Reply With Quote
  #2  
Old   
joel garry
 
Posts: n/a

Default Re: Bulk Insert - 06-15-2011 , 04:09 PM






On Jun 14, 1:39*pm, The Magnet <a... (AT) unsu (DOT) com> wrote:
Quote:
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/...ctices-part-2/

Didn't notice any actual examples though.

Quote:
If stock_info_snapshot contains a nested table, can this or will this
work?
Does it give you an error?

jg
--
@home.com is bogus.
http://www.signonsandiego.com/news/2...ndparent-scam/

Reply With Quote
  #3  
Old   
The Magnet
 
Posts: n/a

Default Re: Bulk Insert - 06-16-2011 , 02:04 PM



On Jun 15, 4:09*pm, joel garry <joel-ga... (AT) home (DOT) com> wrote:
Quote:
On Jun 14, 1:39*pm, The Magnet <a... (AT) unsu (DOT) 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
--
@home.com is bogus.http://www.signonsandiego.com/news/2...o-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......

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.