Forum Stats

  • 3,781,648 Users
  • 2,254,533 Discussions


convert sql server to Oracle Procedure

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.




  • Mike Kutz
    Mike Kutz Member Posts: 5,947 Silver Crown

    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)