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

2007-02-08 Thread Jan Wieck
On 1/30/2007 3:17 PM, Jamie A Lawrence wrote: Just a datapoint: SQL*Plus: Release 10.1.0.3.0 - Production on Tue Jan 30 15:15:49 2007 Copyright (c) 1982, 2004, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production With the Partition

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

2007-02-05 Thread BillR
Peter Eisentraut wrote: D'Arcy J.M. Cain wrote: SELECT * FROM table WHERE column IS NULL; SELECT * FROM table WHERE column = NULL; The latter violates the SQL spec and is not allowed by PostgreSQL without setting a special flag. It doesn't violate any spec and it's certainly a

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

2007-02-05 Thread Jamie A Lawrence
Just a datapoint: SQL*Plus: Release 10.1.0.3.0 - Production on Tue Jan 30 15:15:49 2007 Copyright (c) 1982, 2004, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production With the Partitioning, OLAP and Data Mining options SQL> select

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

2007-02-01 Thread Andrew Sullivan
On Wed, Jan 31, 2007 at 12:18:03PM -0800, BillR wrote: > Peter Eisentraut wrote: > >It doesn't violate any spec and it's certainly allowed by PostgreSQL > >without any flags. It's just that the result is not what some people > >expect. > "= NULL" violates the SQL-92 Specification. I don't w

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

2007-01-30 Thread Tomas Vondra
> On Tue, Jan 30, 2007 at 02:38:07PM +0100, Bart Degryse wrote: > >> Andrew, I think you're wrong stating that Oracle would interpret >> NULL and empty string as equal. The Oracle databases I use (8, 9 >> and 10) certainly make a distiction between both values. Maybe >> earlier versions did so, th

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

2007-01-30 Thread Peter Eisentraut
D'Arcy J.M. Cain wrote: >SELECT * FROM table WHERE column IS NULL; >SELECT * FROM table WHERE column = NULL; > > The latter violates the SQL spec and is not allowed by PostgreSQL > without setting a special flag. It doesn't violate any spec and it's certainly allowed by PostgreSQL without

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

2007-01-30 Thread Geoff Tolley
Andrew Sullivan wrote: AFAIK they don't accept the latter any more than we do. But again, I'm an Oracle ignoramous. I _do_ know that people of my acquaintance who have historically only developed against Oracle have given me queries with things like value = '' in it, and been surpr

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

2007-01-30 Thread Andrew Sullivan
On Tue, Jan 30, 2007 at 11:38:34AM -0500, D'Arcy J.M. Cain wrote: > I don't have an Oracle installation here and I haven't used it much but > I wonder if they treat the following two statements differently. > >SELECT * FROM table WHERE column IS NULL; >SELECT * FROM table WHERE column = NU

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

2007-01-30 Thread D'Arcy J.M. Cain
On Tue, 30 Jan 2007 09:23:32 -0500 Andrew Sullivan <[EMAIL PROTECTED]> wrote: > Hmm. Well, I'm not an Oracle guy, so I don't really know. All I > know is that we occasionally get people coming from Oracle who are > surprised by this difference. What I've been _told_ is that '' and > NULL are und

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

2007-01-30 Thread Herouth Maoz
Andrew Sullivan Wrote: > On Tue, Jan 30, 2007 at 02:38:07PM +0100, Bart Degryse wrote: > > Andrew, I think you're wrong stating that Oracle would interpret > > NULL and empty string as equal. The Oracle databases I use (8, 9 > > and 10) certainly make a distiction between both values. Maybe > > ea

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

2007-01-30 Thread Andrew Sullivan
On Tue, Jan 30, 2007 at 02:38:07PM +0100, Bart Degryse wrote: > Andrew, I think you're wrong stating that Oracle would interpret > NULL and empty string as equal. The Oracle databases I use (8, 9 > and 10) certainly make a distiction between both values. Maybe > earlier versions did so, that I don

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

2007-01-30 Thread Bart Degryse
Andrew, I think you're wrong stating that Oracle would interpret NULL and empty string as equal. The Oracle databases I use (8, 9 and 10) certainly make a distiction between both values. Maybe earlier versions did so, that I don't know. >>> Andrew Sullivan <[EMAIL PROTECTED]> 2007-01-30 14:13 >>