dbTalk Databases Forums  

Update query on Oracle with PL/SQL

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Update query on Oracle with PL/SQL in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
John61
 
Posts: n/a

Default Update query on Oracle with PL/SQL - 12-21-2005 , 05:08 PM






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.



Reply With Quote
  #2  
Old   
DA Morgan
 
Posts: n/a

Default Re: Update query on Oracle with PL/SQL - 12-22-2005 , 10:58 AM






John61 wrote:
Quote:
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@x.washington.edu
(replace x with u to respond)


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.