Re: [SQL] Differentiate Between Zero-Length String and NULL Column Values

2007-01-30 Thread Andrew Sullivan
On Tue, Jan 30, 2007 at 04:32:22PM +1100, Phillip Smith wrote: > SHAMPOO","EQUEST","401600","0.00","0.00","0.00","0.00","10.00","" ^^ > SELECT * FROM tmpstk WHERE ean = NULL; Along

Re: [SQL] Differentiate Between Zero-Length String and NULL Column Values

2007-01-29 Thread Michael Fuhr
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) = ''; >

[SQL] Differentiate Between Zero-Length String and NULL Column Values

2007-01-29 Thread Phillip Smith
Hi All, Small problem with 8.2.1, I have a temp table of basic stock details: CREATE TEMP TABLE tmpstk ( code varchar(6), description varchar(38), grp varchar(4), brand text, style text, supplier varchar(6), supp