Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Comparing Null values in PL/SQL with varchar2
I'm searching for an elegant way to compare two varchar2 vars, what i want
is this
var1 var2 result
'' '' true
null null true
'aa' 'aa' true
'a' 'b' false
when using nvl() like this:
a varchar2(10);
b varchar2(10);
if nvl(a,'blabla') = nvl(b,'blabla')
then
et etc.
i always have to be sure that b or a cannot be 'blabla', can anybody tell me what a better solution is, WITHOUT writing all the code out ( if a is null ) ?????
Please reply with e-mail: jeroenhog_at_gmx.net
greetings and thanks in advance Jeroen Received on Sat Sep 04 1999 - 04:12:23 CDT