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 -> Re: Need help with an update

Re: Need help with an update

From: Tom Dyess <tdyess_at_dyessindustries.com>
Date: Thu, 24 Jan 2002 23:35:53 GMT
Message-ID: <tT048.111401$_w.15602814@typhoon.tampabay.rr.com>


What's the error? Where does the error point?

Tom
www.oraclepower.com

"Håkon Erdal" <he_at_hiadata.no> wrote in message news:Sb048.1484$pd5.36044_at_news2.ulv.nextra.no...
> Hi
>
> I have a database with the following three tables:
>
> TABLE_A
> Id Number(10)
>
> TABLE_B
> Id Number(10)
> RegDate Date
> TableAId Number(10)
>
> TABLE_C
> Id Number(10)
> RegDate Date
> TableAId Number(10)
> TableBId Number(10)
>
>
> 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 - 17:35:53 CST

Original text of this message

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