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: null select

Re: null select

From: Steve Johnson <robertoc_at_fyiowa.infi.net>
Date: 1997/08/28
Message-ID: <3405974E.5462@fyiowa.infi.net>#1/1

Either use exceptions which it sounds like you don't want to use or if all that you care about is yes it exists or no it doesn't exist then use:
select count(*)
into cnt
from tableA
where ...blah.

Mr. News wrote:
>
> hi
>
> i am having some problems with my select into
> statement.
>
> i'm trying to see if an item is in a table. but
> oracle complains when nothing returns from
> the query.
>
> is there a way around this? i.e. how do i tell
> if something is in the table or not?
>
> here's a bit of code:
>
> select rpt_id
> into myvar
> from tableA
> where ...blah..
>
> thanks.
  Received on Thu Aug 28 1997 - 00:00:00 CDT

Original text of this message

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