Whoops, sorry, you are perfectly correct. I've been caught out like this
before, the online docs tantalising me with features that aren't in my
version of sqlite. I suppose I must restrict myself to the locally-installed
docs for my version.
Cheers,
Tom Sillence
2009/10/27 D. Richard Hipp
Scott Hess wrote:
> On Tue, Oct 27, 2009 at 9:35 PM, John Crenshaw
> wrote:
>> Meh, I don't want it THAT badly. I'm just saying that's how it should
>> have been in the original design of the SQL language. In fact though, it
>> probably wouldn't have mattered. Every
> sqlite> select 1 is 2;
> SQL error: near "2": syntax error
> sqlite> select 1 is null;
> 0
>
> It seems to me the documentation is wrong here. That said I'd
> much rather the behaviour of sqlite changed to match the docs
> rather than vice-versa because I really want to write neat
> queries
On Tue, Oct 27, 2009 at 9:35 PM, John Crenshaw wrote:
> Meh, I don't want it THAT badly. I'm just saying that's how it should
> have been in the original design of the SQL language. In fact though, it
> probably wouldn't have mattered. Every different RDBMS seems to
John Crenshaw wrote:
> Yeah, I tend to agree that null != null is confusing,
But SQL doesn't have NULL != NULL. It has NULL != NULL IS NULL. That
makes it even more confusing.
___
sqlite-users mailing list
sqlite-users@sqlite.org
Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Darren Duncan
Sent: Wednesday, October 28, 2009 12:09 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Grammar of "X is Y"
John Crenshaw wrote:
> Yeah, I tend to ag
On Tue, Oct 27, 2009 at 04:07:37PM -0700, Darren Duncan scratched on the wall:
> Jay A. Kreibich wrote:
> > On Tue, Oct 27, 2009 at 04:15:57PM +, Tom Sillence scratched on the
> > wall:
> >> because I really want to write neat queries like:
> >>
> >> select col1 is col2 from table
> >
> >
John Crenshaw wrote:
> Yeah, I tend to agree that null != null is confusing, however that is
> the way it is "supposed" to behave, so changing that would break a lot
> of code. If I had my way, and the behavior of NULL in operations COULD
> be changed, I would opt for the following:
>
> NULL =
9 8:27 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Grammar of "X is Y"
John Crenshaw wrote:
>> There's nothing wrong with that.
>
> Not unless style counts for something. X is Y looks far too much like
X
> as Y for my taste. I'd rather do a litt
The documentation, http://sqlite.org/lang_expr.html suggests that "is"
behaves like "=" except that "null is null" returns true. However in
practice the sqlite sql parser won't accept the word "is" followed by
anything other than "null" (oh and I suppose "not" as in "is not").
sqlite> select 1 is
John Crenshaw wrote:
>> There's nothing wrong with that.
>
> Not unless style counts for something. X is Y looks far too much like X
> as Y for my taste. I'd rather do a little extra typing to have clear
> logic than to have clearly unclear code like that. My first thought when
> I saw this was
sday, October 27, 2009 7:08 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Grammar of "X is Y"
Jay A. Kreibich wrote:
> On Tue, Oct 27, 2009 at 04:15:57PM +, Tom Sillence scratched on
the wall:
>> because I really want to write neat queries like:
>
Jay A. Kreibich wrote:
> On Tue, Oct 27, 2009 at 04:15:57PM +, Tom Sillence scratched on the wall:
>> because I really want to write neat queries like:
>>
>> select col1 is col2 from table
>
> Are you sure? You just want a result set of true/false values?
There's nothing wrong with that.
On Tue, 27 Oct 2009, John Crenshaw wrote:
> To: General Discussion of SQLite Database <sqlite-users@sqlite.org>
> From: John Crenshaw <johncrens...@priacta.com>
> Subject: Re: [sqlite] Grammar of "X is Y"
>
> ROFL
>
> -Original Message--
ROFL
-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Griggs, Donald
Sent: Tuesday, October 27, 2009 12:31 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Grammar of "X is Y"
Importance: Low
Depen
Depends on what your definition of "is" is.
(Sorry, non-English speakers. This is a tiny joke based in American
political history)
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
On Tue, Oct 27, 2009 at 04:15:57PM +, Tom Sillence scratched on the wall:
> because I really want to write neat queries like:
>
> select col1 is col2 from table
Are you sure? You just want a result set of true/false values?
-j
--
Jay A. Kreibich < J A Y @ K R E I B I.C H >
"Our
On Oct 27, 2009, at 12:15 PM, Tom Sillence wrote:
> The documentation, http://sqlite.org/lang_expr.html suggests that "is"
> behaves like "=" except that "null is null" returns true. However in
> practice the sqlite sql parser won't accept the word "is" followed by
> anything other than "null"
This behavior of "is" appeared in 3.6.19. What version of SQLite do you have?
Pavel
On Tue, Oct 27, 2009 at 12:15 PM, Tom Sillence wrote:
> The documentation, http://sqlite.org/lang_expr.html suggests that "is"
> behaves like "=" except that "null is null" returns true.
The documentation, http://sqlite.org/lang_expr.html suggests that "is"
behaves like "=" except that "null is null" returns true. However in
practice the sqlite sql parser won't accept the word "is" followed by
anything other than "null" (oh and I suppose "not" as in "is not").
sqlite> select 1 is
20 matches
Mail list logo