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 -> UPDATE query problem

UPDATE query problem

From: Syltrem <syltremzulu_at_videotron.ca>
Date: Fri, 29 Jun 2007 17:42:17 -0400
Message-ID: <138av60rhnpfqfc@corp.supernews.com>


Hi

I'm trying to update 2 columns in a table, with values that exist in the same table under a different key value.
The select ion of rows in the table to update, is made by matching key columns from a cross reference table.
Only those rows that exist in the XREF table mnust be updated

Table XREF:
KEYVAL1
KEYVAL2
DESCRIPTION
HELPTEXT Table to be updated:MYTABLE
KEYVAL
DESCRIPTION
HELPTEXT I must take the DESCRIPTION and HELPTEXT from MYTABLE where MYTABLE.KEYVAL = XREF.KEYVAL1, and update this value in MYTABLE where MYTABLE.KEYVAL=XREF.KEYVAL2 I can`t find a way to do this except by doing PL/SQL

Can this be done in a single SQL query ?

Thanks !

Syltrem
Oracle 10gR2 on VMS Received on Fri Jun 29 2007 - 16:42:17 CDT

Original text of this message

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