Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Q: any idea what are we missing ?

Re: Q: any idea what are we missing ?

From: Ganesh Raja <ganesh.raja_at_gmail.com>
Date: Wed, 20 Sep 2006 08:36:47 +0200
Message-ID: <f754edf0609192336j1faecb92m2b41318885d98565@mail.gmail.com>


You r hitting the Exception when No-Data-Found and that is Not Being captured. Would See the function like this ....

Begin
Begin
Select
set return value.
exception
set return value.
end
return return value
end

On 9/20/06, Amihay Gonen <AmihayG_at_ectel.com> wrote:
>
> create or replace function t1 return number
>
> is
>
> v_exists number(5):=0;
>
> begin
>
> select 1
>
> into v_exists
>
> from dual where 1 = 0;
>
> return v_exists;
>
> --exception
>
> -- when others then
>
> -- v_exists := '999';
>
> -- return 999;
>
> end t1;
>
> /
>
>
>
> select t1 from dual;
>
>
>
> Expected: ORA-01403: no data found
>
> Actual:
>
> fraud_owner_at_E2E811> select t1 from dual
>
> 2 /
>
>
>
> T1
>
> ----------
>
>
>
>
>
> fraud_owner_at_E2E811>
>
>
> 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.
>

-- 
-----------------------------------------------------------
http://iyertalks.blogspot.com/

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Sep 20 2006 - 01:36:47 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US