RE: any idea what are we missing ?

  • From: "Powell, Mark D" <mark.powell@xxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 20 Sep 2006 11:43:19 -0400

A select into query must return ONE and ONLY ONE row.  Anything else is
an error!  Your query returns no rows.  There are no_rows and
too_many_rows (check correct spelling) exceptions provided.  Look in the
PL/SQL manual
HTH -- Mark D Powell --


        From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Amihay Gonen
        Sent: Wednesday, September 20, 2006 1:23 AM
        To: oracle-l@xxxxxxxxxxxxx
        Subject: Q: any idea what are we missing ?

        create or replace function t1 return number


           v_exists number(5):=0;


           select 1

           into   v_exists

           from dual where 1 = 0;

           return v_exists;


        --    when others then

        --        v_exists := '999';

        --        return 999;

        end t1;



        select t1 from dual;


        Expected: ORA-01403: no data found


        fraud_owner@E2E811> select t1 from dual

          2  /








IMPORTANT: The contents of this email and any attachments are
confidential and proprietary to ECtel Ltd. They are intended for the
named recipient(s) only. If the reader of this message is not the
intended recipient, you are hereby notified that any dissemination, use,
distribution or copying of this communication is strictly prohibited and
may be unlawful. 
If you have received this email in error, please notify us immediately
by replying to the message and deleting it from your computer.

Other related posts:

  • » RE: any idea what are we missing ?