By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
CREATE OR REPLACE FUNCTION IS_HOLIDAY( CHECK_DATE IN DATE ) RETURN BOOLEAN IS RETURN_VAL BOOLEAN; CNT NUMBER(3); BEGIN RETURN_VAL := FALSE; BEGIN SELECT COUNT(*) INTO CNT FROM HOLIDAY_MASTER WHERE FROM_DATE <= CHECK_DATE AND TO_DATE >= CHECK_DATE AND RECORD_STATUS='ACTIVE'; RETURN_VAL := TRUE; EXCEPTION WHEN NO_DATA_FOUND THEN RETURN_VAL := FALSE; END; RETURN RETURN_VAL; EXCEPTION WHEN NO_DATA_FOUND THEN RAISE_APPLICATION_ERROR(-20005,'Error (NO DATA FOUND) while Calculating Dates for Esclation or To Be Rectification Date for Date : ' || CHECK_DATE); WHEN OTHERS THEN RAISE_APPLICATION_ERROR(-20006,'Error while Calculating Dates for Esclation or To Be Rectification Date for Date : ' || CHECK_DATE); -- Data_Replication_Error_Log(SQLCODE, SQLERRM, NULL, -- 'Date Error: '); END; /When I execute this using the following statement:
select is_holiday('25-DEC-2006') from dualI am getting an error like this: "ORA-06552: Statement ignored ORA-06553:PLS-382: Expression is of Wrong Type." What is the problem here? Why am I getting the error? Thank you.
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.