On Tue, Jan 30, 2007 at 04:32:22PM +1100, Phillip Smith wrote:
> The second row (401600) is what I'm interested in for this particular
> problem. The problem is when I try and add a WHERE clause:
>       SELECT * FROM tmpstk WHERE ean = '';
>       SELECT * FROM tmpstk WHERE TRIM(ean) = '';
>       SELECT * FROM tmpstk WHERE ean = NULL;
> None of the above queries return any rows.

Checking for equality against NULL won't work unless you have
transform_null_equals set, which you shouldn't.  Use IS NULL instead:

SELECT * FROM tmpstk WHERE ean IS NULL;

-- 
Michael Fuhr

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to