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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Please check this syntax

Re: Please check this syntax

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Mon, 04 Apr 2005 08:23:16 -0700
Message-ID: <1112627981.564561@yasure>


Josh White wrote:

> OK. There will always be exactly one row although the BGTNO may be
> null.
>
>

>>>      IF v_bgtNo IS NULL THEN
>>
>>No going to ever happen. Try SQL in SQL*Plus before ever putting
>>it into NDS.

>
>
> You lost me here. Why will this never happen? If the EXECUTE IMMDEIATE
> statement returns null (INTO v_bgtNo) what value will v_bgtNo get?

NULL. But why not just do this:

SELECT CT.COMPCODE
INTO v_compType
FROM COMPTYPE CT
WHERE CT.COMPTYPE = :newRow.COMPTYPE;

IF v_compType IS NULL THEN

   do something;
END IF; Why make it so complex?

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Mon Apr 04 2005 - 10:23:16 CDT

Original text of this message

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