Re: Change from using a PKG to a Table to get Values

From: andrewst <member14183_at_dbforums.com>
Date: Tue, 24 Jun 2003 12:16:26 +0000
Message-ID: <3037113.1056456986_at_dbforums.com>


Originally posted by jjosull
> Change from using a PKG to a Table to get Values
> Trying to Change
>
> I have a variable period_open_flag declared as boolean.
>
> Currently, a pkg utility.pkg(get_period) function gets called and
> assigns 4 values to the period_open_flag variable.
>
> This variable is then used in the calculation of different end date's
> etc through out the rest of the code.
>
> Like so..
>
> period_open_flag := int_utility_pkg.get_period(pd_end_date, dte_stamp,
> fi_month, fi_year);
>
>
> I have to change the way this pgm works by not using the
> int_utility_pkg.get_period any more & using a table int_periods table
> instead..
>
> Table Def:
>
> int_periods
> period Varchar2
> period_start_date Date
> period_end_date Date
> creation_date Date
>
>
>
> Is there any way i can use the table instead of the pkg & function w/o
> having to change the rest of the code??
>
> I tried creating a cursor called period_open_flag with the above
> table, and getting the values i need w/o huge changes
>
> IF anybody has any pointers that'dbe great, if i havent been detailed
> enough i can provide more details.
>
> Many Thanks For any help
Why not write your own packaged function that has same parameters as int_utility_pkg.get_period but uses the new table?

Then all you have to do is a global search and replace of "int_utility_pkg.get_period" to "my_new_int_utility_pkg.get_period" or whatever.

--
Posted via http://dbforums.com
Received on Tue Jun 24 2003 - 14:16:26 CEST

Original text of this message