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: Select INTO and Forms 5.0 question

Re: Select INTO and Forms 5.0 question

From: Sandy Thrasher <sandra.thrasher_at_MCI2000.com>
Date: 1998/01/18
Message-ID: <oGsw.10290$hs.661172@news.internetMCI.com>#1/1

-----Original Message-----
From: Karl E. Jørgensen <kjorg_at_msn*DOT*com> Newsgroups: comp.databases.oracle.server Date: Friday, January 16, 1998 3:56 PM
Subject: Re: help with select into

>It doesn't make much sense to reference SQL%NOTFOUND after a SELECT ...
 INTO
>... FROM... etc. For example:
>
> DECLARE
> myvar number;
> BEGIN
> SELECT some_column
> INTO my_variable
> FROM my_table
> WHERE ... whatever ...
>
> IF SQL%NOTFOUND THEN
> <NEVER-EXECUTED PL/SQL statements !!!!!>
> END IF;
> END;
>
>The reason is that Oracle treats it as an error if your query does not
>return any rows. Thus the select...into... WILL raise an exception
>(no_data_found). Without this, you would not know whether you got a value
>back or not !
>

Oracle does not treat it as an error my version of Oracle Forms (4.5). If you use
SQL%NOTOFOUND after a select, an exception is not raised. I've used it and seen it used quite often in Forms (but not in Stored procedures). Is this no longer true in the new version of Forms (5.0)? Does it not work in Stored Procedures or SQL*PLUS? I'm planning on upgrading to Forms 5.0 and I'd like to know what I'm up against.....

Thanks,

Sandy Received on Sun Jan 18 1998 - 00:00:00 CST

Original text of this message

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