Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to test cursor null and then continue...

490078Jan 26 2009 — edited Jan 26 2009
Hi all,

I do a loop upon a cursor with argument :


declare
cursor my_cursor(j date) is select fact_id from factures where fact_date = j;
begin
for c in my_cursor(jour) lopp
dbms_output.put_line('data found');
end loop;
when no_data_found then dbms_output.put_line('data not found'); -- this dosen't work !
end;
/

My problem is when the cursor contains no data for a given date, I'd like to write a message for inform me.

How do I do it ?

TIA.

Yang
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 23 2009
Added on Jan 26 2009
5 comments
449 views