Hi all,
I am trying to create a swapping synonym pl/sql but I am not sure of how case works with subqueries.
I have created procedure mobile_swap2 and mobile_swap2 to load and create the data and to swap the synonyms within these procedures.
create or replace
PROCEDURE SYNONYM_SWAP
IS
BEGIN
case when (select * from all_synonyms where synonym_name = 'MV_RG' and table_name = RG_SWAP1)
then
execute immediate ('execute mobile_swap2');
case when (select * from all_synonyms where synonym_name = 'MV_RG' and table_name = RG_SWAP2)
then
execute immediate ('execute mobile_swap1');
END SYNONYM_SWAP;
Please let me kwno if this is feasible.
Message was edited by:
CrackerJack
null