0
votes

I have a stored procedure in SQL Server which is migrated to oracle database.

  1. In SQL Server I created a temporary tables taking the column names from the table which is comma separated string. Then based upon the column names I created a temporary table.
  2. Then I insert rows into the temporary table and query these tables and do the process.
  3. Finally Drop the tables.

How can I achieve the same thing in oracle ?

1
What is the business problem you are trying to solve? Why bother with the temporary table? Why not simply query the source table? - Justin Cave
I am not worrying of temporary tables. I want to say that I have done this in SQL Server. What is the equivalent process in Oracle. - user1990383
The equivalent process depends. What specific problem does introducing the temporary table solve for you in SQL Server? That will influence the most appropriate Oracle solution. - Justin Cave

1 Answers

0
votes

In Oracle you probably need something like a PL/SQL associative array of records (otherwise known as "Index-by" tables). Fetch the records one by one with a cursor, or use BULK COLLECT to fetch all at once into the array, then process them in memory.