Fernando Papa wrote:
>
> and (sp_link IS NOT NULL OR sp_link <> '')
If sp_link <> '' then it is of course NOT NULL so ...
you get:
sp_link IS NOT NULL --> true
sp_link <> '' --> false
true OR false === true ;)
If I understand what you expect correctly, what you need is:
AND sp_link IS NOT NULL
AND sp_link <> ''
HTH,
--
Jean-Christian Imbeault