Here is my code:
create or replace
procedure date_report (start_date timestamp , end_date timestamp )
is
cursor cursor_audit is
select audit_id, audit_action, audit_user, audit_date
from customer_audit
where audit_date between start_date and end_date
;
rec cursor_audit%rowtype;
begin
open cursor_audit;
fetch cursor_audit into rec;
while cursor_audit%found
loop
dbms_output.put_line('User : ' || rec.audit_user
|| ', ID :' || rec.audit_id
|| ', Action: ' || rec.audit_action
|| ', Date : ' || rec.audit_date );
fetch cursor_audit into rec;
end loop;
close cursor_audit;
end;
I want to query all rows between specific dates but it seems to not report anything.