Q

Other ways to call variable name packages

I asked this question about calling variable name packages to you on May 27. You suggested to use 'IF-THEN-ELSE'. But the name of the packages can be changed or new states can be added. If I use 'IF-THEN-ELSE', in every change I must to modify the packages, and I must not to forget to change the packages. So this method is not so useful. Is there another way to call the variable name packages?

Another method that you can try is to use the EXECUTE IMMEDIATE statement in your PL/SQL block. In your case, v_pck_name contains the name of the procedure's package that you want to run. You can execute this dynamically as follows:

EXECUTE IMMEDIATE v_pck_name;
This would probably be a much cleaner solution than the one that I originally gave to you.

For More Information


This was first published in June 2003

Dig deeper on Oracle database design and architecture

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close