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 -> Help me double check this query. Please?

Help me double check this query. Please?

From: Greg Akins <gakinsNOgaSPAM_at_gatewayhealthplan.com.invalid>
Date: Mon, 06 Dec 1999 09:35:14 -0800
Message-ID: <09920fb9.06801268@usw-ex0102-013.remarq.com>


Hi,

I have a query which is updating one field in a record, if two fields in that record match 2 fields in a record of another table.

Basically:

update table1 t1 set column_a = 1
where T1.rec_id in (select rec_id from table2 t2

                where t1.rec_id = t2.rec_id )
and t1.rec_date in (select rec_date from table2 t2
                    where t1.rec_Date = t2.rec_Date)

Does this do what I expect it to? Is there a cleaner way to accomplish this?

Any help would be appreciated.

-greg

Received on Mon Dec 06 1999 - 11:35:14 CST

Original text of this message

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