I'm looking for a way to use my Global Temp Table for multiple procedure calls... Some context:
Global Temp Table holds a list of IDs. It's created with an on commit delete rows;
clause.
My package body has 1 function and 5-10 procedures. My first iteration had 6-11 functions until I found I couldn't return a cursor and then push it into another function and so on and so on...
So the procedures will save IDs to a GTT, each procedure having very different logic which cannot be cleanly done in a single query.
My problem is that when jumping between procedure calls (all procedures are called from within the first function), the transaction seems to be renewed in some way and the GTT is refreshed.
I could use a regular table and trunk the table at the start and end of each call to the function but there must be a better way.
Any advice?