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

Home -> Community -> Usenet -> c.d.o.misc -> Update Query Question

Update Query Question

From: Travis Rogers <trdrdriror_at_home.com>
Date: Sun, 22 Aug 1999 02:25:25 GMT
Message-ID: <37BF5EE8.81EDD2@home.com>


2 Tables Master and Temp.

Temp has 2 fields...
temp_id NUMBER(10)
temp_update VARCHAR2(8)
The Primary key for Temp is a field called temp_id. temp has approx 350k rows

Master has approx 50 fields but the only 2 of importance to this question are...
ID NUMBER(10)
clid VARCHAR2(8)
The Primary key for Master is a field called ID. Master has approx 17million rows

I wanted to update Master with temp by "joining" on Master.ID and Temp.temp_id.

The sytax I was given is...

UPDATE master a
SET a.clid = (SELECT b.temp_update

              FROM temp b
              WHERE a.id = b.temp_id and b.temp_other is not null);

This took forever and completely filled a 2 gig rollback segment.

What is the correct syntax for this situation? Received on Sat Aug 21 1999 - 21:25:25 CDT

Original text of this message

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