| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Query from SQL SErver
PABLO wrote:
> Hi, I am trying to migrate this query from SQL server to Oracle 9i and
> I can not find a way to solve it.
>
> Does someone have and idea of how to do it ?
>
> Thanks a lot in advance.
> Pablo
>
> UPDATE Table1
> SET FieldA = b.FieldB
> FROM ( SELECT Exp as FIledB, Exp as FieldC FROM ... WHERE.... ) As B
> WHERE Table1.FieldA <> b.FieldB
> AND Table1.Field> >= b.fieldC
Hello Pablo,
you could try something like this:
update
(select a.*,exp1 fieldb, exp2 fieldc
from
tablea a,
....
where
a.fielda<>exp1 and
a.fielda>=exp2 and
...) set
This only works if the primary key of tablea is also a key for the whole join. (Have a look at the docs under "key preserved")
Hope that helps,
Lothar
-- Lothar Armbrüster | la_at_oktagramm.de Hauptstr. 26 | la_at_heptagramm.de D-65346 Eltville | lothar.armbruester_at_t-online.deReceived on Thu Oct 10 2002 - 11:17:29 CDT
![]() |
![]() |