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

Home -> Community -> Usenet -> c.d.o.server -> Re: regarding sql

Re: regarding sql

From: DA Morgan <damorgan_at_psoug.org>
Date: Tue, 13 Mar 2007 08:56:20 -0700
Message-ID: <1173801379.789295@bubbleator.drizzle.com>


dutt wrote:
> I had an sql statement for example
>
> select * from employees where employee_id is null
>
> the o/p will be no rows returned.
>
> Now my doubt is whether the feedback we are getting is due to
>
> failure of sql statement or no records are found for the matching
> condition
>
> In detail,
>
> is there any relation between failure of sql statement and no records
> found.

In PL/SQL there is a specific named exception for this condition:

SELECT dummy
FROM dual
WHERE dummy = 'A';

DECLARE
  s STRING(5);
BEGIN
   SELECT dummy
   INTO s
   FROM dual
   WHERE dummy = 'A';
END;
/

Is that what you are seeing?

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Tue Mar 13 2007 - 10:56:20 CDT

Original text of this message

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