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!

PL SQL WHILE LOOP NO_DATA_FOUND

2682837Jul 28 2015 — edited Jul 28 2015

The following code is setting the variable vBoleto to null when the select above return no rows. Can someone explain why please?

    while (true) loop

        begin

       

          select id_boleto_origem

            into vOrigem

            from sn_boleto

           where id_boleto = vBoleto;

       

       

            vBoleto := vOrigem;

       

        exception

          when no_data_found then

            exit;

        end;

      end loop;

This post has been answered by Chris Hunt on Jul 28 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 25 2015
Added on Jul 28 2015
9 comments
513 views