Include common code into packages - use "@@filename.sql" in a package

HBenson

Member
I want to be able to use the "@@filename.sql" in a package that has common constants and short library functions. I have multiple packages that all use the same set of constants and I want to have them defined just once and be used in any of the packages that I write. similar to C++ header files.
 
This is currently not possible. You cannot use include files for program units. It is on the list of enhancement requests though.

------------------
Marco Kalter
Allround Automations
 
Is this request for PLSQL Developer or Oracle?

In order to get this functionality in Oracle we created a "database_common" package that contains constants and common functions. All other packages/routines can reference that. Not as slick as C includes, but gets the job done.
 
You can create a common package and reference its constants, types, variables, and so on in other packages. No problem.

You cannot create a file that contains constants, types and variables that is included in the PL/SQL of one or more packages.

------------------
Marco Kalter
Allround Automations
 
Back
Top