Subject | calling a procedure within a procedure |
---|---|
Author | donoghue_brendan |
Post date | 2005-03-07T07:42:11Z |
Hello
When I attempt to compile the below procedure I get a function unknown
for the GET_WORKING_DAYS.
This is compile on my DB and I can execute it from the command line.
Do I need to declare this procedure at the start and if so how do I do
that?
Thanks for your help.
Brendan Donoghue
CREATE PROCEDURE GET_DISPLAY (DATE_TO DATE)
RETURNS (DISPLAY_DATE INTEGER)
AS
BEGIN
SELECT
CD.DISPLAY_DAY
FROM
CYCLE_DIVISOR CD,
TERM TE,
TERM_GROUP TG,
CYCLE CY
WHERE
TE.TERM_ID = TG.TERM_ID
AND TG.CYCLE_ID = CY.CYCLE_ID
AND CD.DIVISOR_RESULT =
MOD(GET_WORKING_DAYS(TE.START_DATE,:DATE_TO),CY.DAYS_IN_CYCLE)
INTO DISPLAY_DATE;
END!!
When I attempt to compile the below procedure I get a function unknown
for the GET_WORKING_DAYS.
This is compile on my DB and I can execute it from the command line.
Do I need to declare this procedure at the start and if so how do I do
that?
Thanks for your help.
Brendan Donoghue
CREATE PROCEDURE GET_DISPLAY (DATE_TO DATE)
RETURNS (DISPLAY_DATE INTEGER)
AS
BEGIN
SELECT
CD.DISPLAY_DAY
FROM
CYCLE_DIVISOR CD,
TERM TE,
TERM_GROUP TG,
CYCLE CY
WHERE
TE.TERM_ID = TG.TERM_ID
AND TG.CYCLE_ID = CY.CYCLE_ID
AND CD.DIVISOR_RESULT =
MOD(GET_WORKING_DAYS(TE.START_DATE,:DATE_TO),CY.DAYS_IN_CYCLE)
INTO DISPLAY_DATE;
END!!