Subject Re: change condition i WHERE clause
Author csswa
Aha, of course, SET! That first one will evaluate as false if non-
existent so no need for a null check here ...

> SELECT Code FROM Supro, Person
> WHERE
> person.personid = 6789
> and
> (
> person.Posta1 is not null <----- bye, bye...
> and
> person.Postal1 BETWEEN Supro.P1 AND Supro.P2
> )
> or
> (
> person.Postal1 is null
> and
> person.Postal2 BETWEEN Supro.P1 AND Supro.P2
> )

Regards,
Andrew Ferguson
-- Like fuzzy logic, but without the logic.