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: any idea what are we missing ?

RE: any idea what are we missing ?

From: Powell, Mark D <mark.powell_at_eds.com>
Date: Wed, 20 Sep 2006 11:43:19 -0400
Message-ID: <5A14AF34CFF8AD44A44891F7C9FF4105087F0B22@usahm236.amer.corp.eds.com>


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_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Amihay Gonen

	Sent: Wednesday, September 20, 2006 1:23 AM
	To: oracle-l_at_freelists.org
	Subject: Q: any idea what are we missing ?
	
	

	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://www.freelists.org/webpage/oracle-l
Received on Wed Sep 20 2006 - 10:43:19 CDT

Original text of this message

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