Create and executing an oracle stored procedure
Hi All,
I am new to Oracle. I am facing problem in executing the procedure. My requirement is to create a procedure which passes one input parameter and gets the stats data for that input value and should return an array or ADO.
Can somebody help me pls...
CREATE OR REPLACE procedure DB_Popup1 ( c_Val IN Schema1.Table1_stat_data.id%TYPE, cur_val OUT Schema1.Table1_stat_data.number%TYPE)is
begin
select distinct count(*) into cur_val from Schema1.Table1_stat_data
where TO_CHAR(Table1_stat_data.datetime,'dd-mon-yyyy') = TO_CHAR(SYSDATE -2,'dd-mon-yyyy')
AND id_cre = '1609' group by id having count(*) < 244;
end;
/
Thanks in advance,
Ven
|