Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Update query on Oracle with PL/SQL
John61 wrote:
> We're moving a SQL Server database to Oracle. I have difficulty in
> converting this update query to PL/SQL. The query involves three tables, and
> ran fine in SQL Server. But I just can't figure out how to rewrite it as I'm
> totally new to PL/SQL.
>
> UPDATE AAA
> SET AAA.mm = BBBB.nn, AAAA.xx = BBB.yy
> from (BBB INNER JOIN CCC ON (BBB.ee = CCC.ff))
> INNER JOIN AAA ON (CCC.pp = AAA.qq) AND (BBB.ss = AAA.tt)
>
> As there are millions of records in those tables, each run on SQL server
> takes about 1 hour or so. Hopefully it wouldn't take too long on Oracle.
>
> Thanks.
www.psoug.org
click on Morgan's Library
click on Update
also check out:
http://tahiti.oracle.com
http://asktom.oracle.com
And you might want to consider not using the ANSI syntax. It is verbosity without purpose. But don't expect Oracle to be faster than SQL Server if you haven't read up on Oracle and learned how to leverage its better technology.
-- Daniel A. Morgan http://www.psoug.org damorgan_at_x.washington.edu (replace x with u to respond)Received on Thu Dec 22 2005 - 10:58:55 CST
![]() |
![]() |