Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> UPDATE query problem
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