I've created an oracle procedure and it's working on oracle SQL editor.
I want to use the procedure in Crystal report.
From database expert, I select the procedure and there's an error message:
==============================
Query Engine Error: 'ADO Error Code: 0x
Source: OraOLEDB
Description: ORA-01850: hour must be between 0 and 23
ORA-06512: at "NPLS.PROC_YEARLYACTIVELIST2", line 19
ORA-06512: at line 1
Native Error: '
==============================
I declare the variables like this:
==============================
str INT;
inv_date DATE;
==============================
Here's the procedure,
==============================
CREATE OR REPLACE PROCEDURE PROC_YEARLYACTIVELIST2(in_year IN VARCHAR)
AS
ctr INT;
str INT;
curr_rowid VARCHAR2(50);
inv_date DATE;
BEGIN
DELETE FROM TBLACTIVELISTYEARLY2;
ctr := 1;
FOR ctr IN 1..12
LOOP
IF ctr = 1 THEN
str := '01';
inv_date := to_date('31-01-' || in_year || ' 23:59:59', 'DD-MM-YYYY HH24:MI:SS');
END IF;
END;
/
==============================
I've been trying to solve this problem for so long and still can't find solution.
I hope you can help me.
Thanks! :)
-Michelle (On the job trainee)