Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Zero lenght identifier............
In article <9cr9fd$7q7$1_at_reader1.imaginet.fr>, dbl <homer.simpson_at_mailbox.as>
writes:
>Hello!
>I'm trying to add a test in my PL/SQL script, like this :
>
>if '&5' = ''
>then .....................
>
>or :
>value := '&5'
>
>if value = ''
>then ..........
>
>BUT : no way.............. i'm actually unable to pass through this 'IF'
>...........
>
>As I'm not a PL/SQL expert, does anyone have an idea ???????
>
>
>Thanks a Lot :-)
>
Since null is the absence or an unknown value then logically nothing can ever
test equal to it!
v_variale := &var;
if v_variable is null then ....
Pl/sql is sloppy and lets you get away with the syntax but in the manual Oracle warns you not to code if var = null type statements. We have more than a few of these to contend with outselves.