Re: = NULL vs. IS NULL

2001-10-24 Thread Stephen Clouse
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, Oct 23, 2001 at 11:46:41AM -0600, Sterin, Ilya wrote: > Exactly why I am even having this issue. I can ofcourse switch to using one > space, though varchar will still trim it. This is an annoying standard I > must say:-) > > You are correct

Re: = NULL vs. IS NULL

2001-10-24 Thread Tim Bunce
On Wed, Oct 24, 2001 at 12:38:50PM +0200, Bart Lateur wrote: > On Wed, 24 Oct 2001 11:01:25 +0200, Wolfgang Weisselberg wrote: > > >insert into bar (foo,baz) values ('NULL', 'inserted string NULL'); > >insert into bar (foo,baz) values ( NULL , 'inserted (undefined) NULL'); > > > >sele

Re: = NULL vs. IS NULL

2001-10-24 Thread Bart Lateur
On Wed, 24 Oct 2001 11:01:25 +0200, Wolfgang Weisselberg wrote: >insert into bar (foo,baz) values ('NULL', 'inserted string NULL'); >insert into bar (foo,baz) values ( NULL , 'inserted (undefined) NULL'); > >select * from bar where foo = ? >Try binding >my $bindvar = "NULL"; >an

Re: = NULL vs. IS NULL

2001-10-24 Thread Wolfgang Weisselberg
Sterin, Ilya <[EMAIL PROTECTED]> wrote: > Within the where clause of the query that is prepared...' > where foo = ? > When binding an undef value when executing, this executes "where foo = > NULL". In Oracle there is a difference between foo = NULL and foo is NULL. > This also kind of disallow

Re: = NULL vs. IS NULL

2001-10-23 Thread Philip Newton
On Tue, 23 Oct 2001 23:56:39 +0200, [EMAIL PROTECTED] (Bart Lateur) wrote: > On Tue, 23 Oct 2001 12:35:57 -0500, Stephen Clouse wrote: > > >This is not Oracle, but ANSI-standard behavior. NULL represents the absence or > >non-existence of a value. A non-existent value cannot be equal to anyth

RE: = NULL vs. IS NULL

2001-10-23 Thread Alex Pilosov
ily reusing the query using > placeholders, of course there are many ways around. > This is getting OT, unless it will in some ways spark any ideas for DBI/DBD > patches. > > Ilya > > -Original Message----- > From: Bud Rogers > To: [EMAIL PROTECTED] > Sent:

RE: = NULL vs. IS NULL

2001-10-23 Thread Wilson, Doug
> From: Sterin, Ilya [mailto:[EMAIL PROTECTED]] > > So if NULL is not defined, what's the difference between "is NULL" and > "=NULL". I guess my disagreement comes from not being able to ask for > undefined field by =undefined, but rather is undefined. It's It is all a matter of being theore

RE: = NULL vs. IS NULL

2001-10-23 Thread Sterin, Ilya
eas for DBI/DBD patches. Ilya -Original Message- From: Bud Rogers To: [EMAIL PROTECTED] Sent: 10/23/01 4:07 PM Subject: Re: = NULL vs. IS NULL On Tuesday 23 October 2001 16:56 pm, Bart Lateur wrote: > On Tue, 23 Oct 2001 12:35:57 -0500, Stephen Clouse wrote: > > >This is not Oracle, but AN

Re: = NULL vs. IS NULL

2001-10-23 Thread Bud Rogers
On Tuesday 23 October 2001 16:56 pm, Bart Lateur wrote: > On Tue, 23 Oct 2001 12:35:57 -0500, Stephen Clouse wrote: > > >This is not Oracle, but ANSI-standard behavior. NULL represents the absence or > >non-existence of a value. A non-existent value cannot be equal to anything. So > >this

RE: = NULL vs. IS NULL

2001-10-23 Thread Sterin, Ilya
me into a big play. Ilya -Original Message- From: Stephen Clouse To: Bart Lateur Cc: [EMAIL PROTECTED] Sent: 10/23/01 4:10 PM Subject: Re: = NULL vs. IS NULL -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, Oct 23, 2001 at 11:56:39PM +0200, Bart Lateur wrote: > My personal opinion is to

RE: = NULL vs. IS NULL

2001-10-23 Thread Mitsuda, Alex
PM To: 'Mitsuda, Alex '; '[EMAIL PROTECTED] ' Subject: RE: = NULL vs. IS NULL Then explain assigning NULL to values in the update query and not being able to query based on NULL as for foo=NULL, but set foo=NULL is legal. Ilya -Original Message- From: Mitsuda, Alex To: [EMA

Re: = NULL vs. IS NULL

2001-10-23 Thread Stephen Clouse
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, Oct 23, 2001 at 11:56:39PM +0200, Bart Lateur wrote: > My personal opinion is to disagree. To me, NULL means "empty". It is not > the same as a zero length string. When did I say it was? In fact, I thought I explicitly stated that Oracle was

RE: = NULL vs. IS NULL

2001-10-23 Thread Sterin, Ilya
Then explain assigning NULL to values in the update query and not being able to query based on NULL as for foo=NULL, but set foo=NULL is legal. Ilya -Original Message- From: Mitsuda, Alex To: [EMAIL PROTECTED] Sent: 10/23/01 4:03 PM Subject: RE: = NULL vs. IS NULL ...choosing to

RE: = NULL vs. IS NULL

2001-10-23 Thread Sterin, Ilya
with any DB vendor that goes beyond the ANSI SQL and allows this syntax. Ilya -Original Message- From: Bart Lateur To: [EMAIL PROTECTED] Sent: 10/23/01 3:56 PM Subject: Re: = NULL vs. IS NULL On Tue, 23 Oct 2001 12:35:57 -0500, Stephen Clouse wrote: >This is not Oracle, but ANSI-

RE: = NULL vs. IS NULL

2001-10-23 Thread Mitsuda, Alex
alid. -Original Message- From: Bart Lateur [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 23, 2001 5:57 PM To: [EMAIL PROTECTED] Subject: Re: = NULL vs. IS NULL On Tue, 23 Oct 2001 12:35:57 -0500, Stephen Clouse wrote: >This is not Oracle, but ANSI-standard behavior. NULL represents the abs

Re: = NULL vs. IS NULL

2001-10-23 Thread Bart Lateur
On Tue, 23 Oct 2001 12:35:57 -0500, Stephen Clouse wrote: >This is not Oracle, but ANSI-standard behavior. NULL represents the absence or >non-existence of a value. A non-existent value cannot be equal to anything. So >this is the correct behavior. I personally don't think DBI should muck w

RE: = NULL vs. IS NULL

2001-10-23 Thread Sterin, Ilya
Depending on which angle you look at it from. I see it as comparison and in that case it the same as x==NULL. Ilya -Original Message- From: PD Miller To: Michael Peppler; Tim Bunce Cc: Sterin, Ilya; '[EMAIL PROTECTED]' Sent: 10/23/01 11:29 AM Subject: Re: = NULL vs. IS NUL

RE: = NULL vs. IS NULL

2001-10-23 Thread Sterin, Ilya
maybe if I have the time, I'll bother that list to get a clear explanation and why is this implemented in this way. Thanks, Stephen. Ilya -Original Message- From: Stephen Clouse To: Sterin, Ilya Cc: '[EMAIL PROTECTED]' Sent: 10/23/01 11:35 AM Subject: Re: = NULL vs. IS

Re: = NULL vs. IS NULL

2001-10-23 Thread Michael Peppler
PD Miller wrote: > > At 9:51 -0700 23/10/01, Michael Peppler wrote: > >And just to be complete, Sybase (and possibly MS) has an "ansinull" option > >that can be set. If it is not set then the "x = null" *will* work correctly. > > I'm not sure about the use of 'correctly' here. NULL is the absenc

Re: = NULL vs. IS NULL

2001-10-23 Thread Stephen Clouse
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, Oct 23, 2001 at 09:39:55AM -0600, Sterin, Ilya wrote: > Ok, this might be a silly one. Though I have no problem solving this issue > by dynamically building the query, there should be a better solution due to > repreparing the statement... >

Re: = NULL vs. IS NULL

2001-10-23 Thread PD Miller
At 9:51 -0700 23/10/01, Michael Peppler wrote: >And just to be complete, Sybase (and possibly MS) has an "ansinull" option >that can be set. If it is not set then the "x = null" *will* work correctly. I'm not sure about the use of 'correctly' here. NULL is the absence of value and therefore cann

RE: = NULL vs. IS NULL

2001-10-23 Thread Sterin, Ilya
sure what role that would play on the DB side as far as placeholders, since this will most likely have to reprepare the query anyways??? Ilya -Original Message- From: Michael Peppler To: Tim Bunce Cc: Sterin, Ilya; '[EMAIL PROTECTED]' Sent: 10/23/01 10:51 AM Subject: Re: = NUL

Re: = NULL vs. IS NULL

2001-10-23 Thread Michael Peppler
Tim Bunce wrote: > > The DBI docs say: > > However, care must be taken in the particular case of trying to use > null values to qualify a C statement. Consider: > > SELECT description FROM products WHERE product_code = ? > > Binding an C (NULL) to the placeholder will I selec

Re: = NULL vs. IS NULL

2001-10-23 Thread Tim Bunce
The DBI docs say: However, care must be taken in the particular case of trying to use null values to qualify a C statement. Consider: SELECT description FROM products WHERE product_code = ? Binding an C (NULL) to the placeholder will I select rows which have a NU

RE: = NULL vs. IS NULL

2001-10-23 Thread Wilson, Doug
> From: Sterin, Ilya [mailto:[EMAIL PROTECTED]] > Within the where clause of the query that is prepared...' > > where foo = ? > > When binding an undef value when executing, this executes "where foo = > NULL". One solution, though ugly, is: where ((? is null and foo is null) or foo = ?) You