Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

convert sql server to Oracle Procedure

User_OD6N8Oct 26 2021

post.txt (30.27 KB)We are currently loading data from Source to STAGE and then Stage to Target ( after joining of multiple tables). -- we have a procedure written in SQL SERVER. Now would like to avoid the staging part and load the data directly from SORUCE to TARGET. ( modify the above script relevant to Source to Target using Oracle stored Procedure).
So we would like to load the data from SOURCE to TARGET ( INSTEAD OF STAGE) using ORCLE STORED PROCEDURE(Oracle 12 c). Please find teh below and advise to write a PROCEDURE which will load the data at faster rate.

Please check and advise.
Thanks

Comments

Mike Kutz

Please copy, paste, format, and code-block the code.
Many of us can't (or won't) download attachments from the internet.
Option 1 : rewrite the body of the code as anINSERT...SELECT
Use a CTE ( WITH clause ) to simulate the STAGE table.
Option 2 : keep the same two step process but use a Global Temporary Table (GTT) as the STAGE table.
Note: With Oracle, you create the GTT once (outside of the stored procedure)

1 - 1

Post Details

Added on Oct 26 2021
1 comment
1,078 views