Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Need help with an update
Hi
I have a database with the following three tables:
TABLE_A
Id Number(10) TABLE_B Id Number(10) RegDate Date
TABLE_C
Id Number(10) RegDate Date
Due to historical problems one of our applications have introduced inconsistency in the base and I want to construct an update that reestablishes consistency. I have tried the following but get an error on the subselect:
UPDATE TABLE_C SET TableBId = (
SELECT DISTINCT Id FROM TABLE_B B, TABLE_C C WHERE B.TableAId=C.TableAId AND B.RegDate=C.RegDate) WHERE C.TableBId=B.Id AND C.TableAId<>B.TableAId
Any hints??
Regards
Håkon Erdal
Hiadata as
Norway
Received on Thu Jan 24 2002 - 16:49:22 CST
![]() |
![]() |