Subject Re: [firebird-support] LIKE statement and NULL field
Author Tanz Anthrox
>
> WHERE
> (MUH_KAYITNO LIKE :KAYITNO OR MUH_KAYITNO IS NULL)
> AND
> (MUH_TARIH LIKE :TARIH OR MUH_TARIH IS NULL)
> AND
> (MUH_MAKBUZNO LIKE :EVRAKNO OR MUH_MAKBUZNO IS NULL)
> AND
> (MUH_ACIKLAMA LIKE :ACIKLAMA OR MUH_ACIKLAMA IS NULL)
>
> Is that what you need?
> Alan
>
>


Actually, not because

if
:KAYITNO = :TARIH = :MAKBUZNO= :ACIKLAMA = '%' ----------------> this
is OK. Result is all records

BUT if one of these parameters is different then % then the result is
false. Because NULL fields MUST NOT return. Nulls are out of condition.

Regards,