Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> REPOST: Re: Need help with an update
I get ORA-00904 illegal column name on B.TableAId
Håkon
"Tom Dyess" <tdyess_at_dyessindustries.com> skrev i melding
news:tT048.111401$_w.15602814_at_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
> >
> >
> >
>
>
>
>
This message was cancelled from within The Unacanceller's glorious new software, Lotus 1-2-3 For Rogue Cancellers. Received on Fri Jan 25 2002 - 01:47:07 CST