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

Home -> Community -> Usenet -> c.d.o.server -> Merge Data Sets

Merge Data Sets

From: Andy Johnson <AJohnson_at_Armature.com>
Date: Wed, 26 Sep 2001 11:27:43 +0100
Message-ID: <783866CAB183D211883F0090271F46C2088648E0@COW>


Thanks..

i'm trying it this way at the moment..

insert /*+ APPEND */ into tab_a (code,table_name) select floor(dbms_random.value(1,5000))as code,table_name from tab_b

which create no rollback and also creates a non unique join key which is what i want, function is not as fast as i would like though...

regards

andy

-----Original Message-----
From: nsouto_at_optushome.com.au.nospam (Nuno Souto) [mailto:nsouto_at_optushome.com.au.nospam]
Posted At: Wednesday, September 26, 2001 11:17 AM Posted To: server
Conversation: Merge Data Sets
Subject: Re: Merge Data Sets

On Wed, 26 Sep 2001 08:48:13 +0100, Andy Johnson <AJohnson_at_Armature.com> wrote:

>Presently i've created a numeric key on each table and joined that way
>but it means I have to use a sequence/update combo i am just looking
for
>anyone that is aware of a faster approach...
>

You might want to revisit the pl/sql option? Define two cursors, one for each table. Open them both. Then in a loop, fetch one, then the other, build up the output row and insert. If number of rows is different, then you may have to add some code to insert NULLs on the one that ends up first. Close both at end.

Shouldn't take too long this way.

Cheers
Nuno Souto
nsouto_at_optushome.com.au.nospam Received on Wed Sep 26 2001 - 05:27:43 CDT

Original text of this message

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