Re: SQL IF
From: Christina <christina_samuel_at_hotmail.com>
Date: 2000/06/12
Message-ID: <3944DC1E.58D12957_at_hotmail.com>#1/1
Date: 2000/06/12
Message-ID: <3944DC1E.58D12957_at_hotmail.com>#1/1
If var1 & var2 are numbers
then try as follows
if nvl(var1,0) <> nvl(var2,0) then ...
If var1 & var2 are char
then try as follows
if nvl(var1,' ') <> nvl(var2,' ') then ...
Greg wrote:
> If I have the SQL code
>
[Quoted] [Quoted] [Quoted] [Quoted] [Quoted]
> if (variable1 <> variable2) then....
>
> Works if the Variables have a value
> but if one of them is null, it doesn't.
>
> how to include the case one of the variables are null in the statement.
>
> thanks Greg
Received on Mon Jun 12 2000 - 00:00:00 CEST