Hi, I tried this today and had no luck. This stored procedure does not work :(
CREATE OR REPLACE PROCEDURE LEAD_PURGE(closed IN DATE, oprtr IN INTEGER, leadscount OUT INTEGER) is BEGIN SELECT COUNT(*) FROM LEADS_DELETED INTO leadscount; COMMIT; END LEAD_PURGE;
The INTO sentence is inappropriate. It should be:
SELECT COUNT(*) INTO leadscount FROM LEADS_DELETED
you have intoin the wrong place.
into
Try something like this and continue from there:
declare cnt number; begin select count(*) into cnt from leads_delete; end;