I feel compelled to throw in my $0.02 here.
To everyone who thinks that SQLite should allow 'foo ' == 'foo':
SQL was originally conceived as a query *language* -- a way for a
human being to request a set of data from a database. It was
specifically designed for ad-hoc queries.
This little
Fowler, Jeff wrote:
I may very well be mistaken - wouldn't be the first time!! I tried to
access the actual specification from ANSI (www.ansi.org), but you either
have to purchase them or access one of the "drafts" (which a couple
folks in this thread have done), but the draft may or may not
-
From: Dennis Cote [mailto:[EMAIL PROTECTED]
Sent: Monday, January 21, 2008 11:46 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] SQLite character comparisons
Fowler, Jeff wrote:
> Hello All,
>
> Not trying to be antagonistic, but I'm curious to know how many of you
agree with
John Elrick <[EMAIL PROTECTED]> wrote:
>
> If we are ignoring trailing spaces, then by definition:
>
> ' ' = ''
>
> and for that matter:
>
> ' ' = ' '
>
Good point. I added these as test cases for the new RTRIM
collation. http://www.sqlite.org/cvstrac/chngview?cn=4735
--
D.
Fowler, Jeff wrote:
Hello All,
Not trying to be antagonistic, but I'm curious to know how many of you agree with Darren's sentiments on this issue. To restate briefly, ANSI SQL-92 specifies that when comparing two character fields, trailing spaces should be ignored. Correct me if I'm wrong
Fowler, Jeff wrote:
Hello All,
Not trying to be antagonistic, but I'm curious to know how many of you agree with Darren's sentiments on this issue. To restate briefly, ANSI SQL-92 specifies that when comparing two character fields, trailing spaces should be ignored.
My $0.02.
If we are
PROTECTED]
Sent: Sun 1/20/2008 11:56 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] SQLite character comparisons
On Jan 20, 2008 10:19 AM, Fowler, Jeff <[EMAIL PROTECTED]> wrote:
>
> Not trying to be antagonistic, but I'm curious to know how many of you agree
> with Darren's
At 11:19 AM -0500 1/20/08, Fowler, Jeff wrote:
To restate briefly, ANSI SQL-92 specifies that when comparing two
character fields, trailing spaces should be ignored. Correct me if
I'm wrong Darren, but you feel this is a bad decision, and in fact
SQLite's implementation of character comparison
"Fowler, Jeff" <[EMAIL PROTECTED]> wrote:
> I'm curious to know how many of you agree with Darren's
> sentiments on this issue
Changing the behavior of SQLite to ignore trailing
spaces is not an option for SQLite version 3, since
to do so would result in a incompatible file format
All
e a concern.
Regards,
Jeff Fowler
From: Darren Duncan [mailto:[EMAIL PROTECTED]
Sent: Fri 1/18/2008 4:47 PM
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] SQLite character comparisons
At 4:11 PM -0500 1/18/08, Fowler, Jeff wrote:
"Better" dep
On Jan 20, 2008 10:19 AM, Fowler, Jeff <[EMAIL PROTECTED]> wrote:
>
> Not trying to be antagonistic, but I'm curious to know how many of you agree
> with Darren's sentiments on this issue.
Sqlite is DRH's project. Voting doesn't come into the picture
anywhere. If you convince him
to fix it then
On Sunday, January 20, 2008 Fowler, Jeff wrote:
> briefly, ANSI SQL-92 specifies that when comparing two character
> fields, trailing spaces should be ignored.
From SQL-92 (draft July 1992) section 4.6
> When values of unequal length are compared, if the collating
> sequence for the comparison
can see where performance may be a concern.
Regards,
Jeff Fowler
From: Darren Duncan [mailto:[EMAIL PROTECTED]
Sent: Fri 1/18/2008 4:47 PM
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] SQLite character comparisons
At 4:11 PM -0500 1/18/08, Fowler,
Doh! Wrong thread. :) :) :)
> -Original Message-
> From: Zbigniew Baniewski [mailto:[EMAIL PROTECTED]
> Sent: Friday, January 18, 2008 5:14 PM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] SQLite character comparisons
>
> On Fri, Jan 18, 2008 at 11:04:09
On Fri, Jan 18, 2008 at 11:04:09PM +, Evans, Mark (Tandem) wrote:
> Think of NULL as "value is unknown".
>
> With zero length blob/text, value is known: 0-length blob/text
OK, I will :)
--
pozdrawiam / regards
> Subject: Re: [sqlite] SQLite character comparisons
>
> On Fri, Jan 18, 2008 at 02:13:51PM -0800, Darren Duncan wrote:
>
> > Don't read too much into that statement; I'm was not raising the
> > auto-trim thing.
>
> Yes, yes - I know... "Roma locuta".
On Fri, Jan 18, 2008 at 02:13:51PM -0800, Darren Duncan wrote:
> Don't read too much into that statement; I'm was not raising the
> auto-trim thing.
Yes, yes - I know... "Roma locuta"...
--
pozdrawiam / regards
At 10:57 PM +0100 1/18/08, Zbigniew Baniewski wrote:
On Fri, Jan 18, 2008 at 12:32:36PM -0800, Darren Duncan wrote:
> If trailing spaces were supposed to be insignificant for an equality test,
then it should not be possible to define a string value containing
trailing spaces at all.
Yes,
On Fri, Jan 18, 2008 at 12:32:36PM -0800, Darren Duncan wrote:
> If trailing spaces were supposed to be insignificant for an equality test,
> then it should not be possible to define a string value containing
> trailing spaces at all.
Yes, yes: quite right... the above reminds me something... ;)
At 4:11 PM -0500 1/18/08, Fowler, Jeff wrote:
"Better" depends on who you ask - I'd say it's worse, and I bet most
DBA's would agree. The ANSI standard is to ignore trailing spaces when
comparing character strings in a WHERE clause, a HAVING clause, or a
join. So I can take the exact same data,
essage-
From: Darren Duncan [mailto:[EMAIL PROTECTED]
Sent: Friday, January 18, 2008 3:33 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] SQLite character comparisons
At 10:43 AM -0500 1/17/08, Fowler, Jeff wrote:
>Hello All,
>I've used SQL Server for over 15 years, Oracle off & on w
At 10:43 AM -0500 1/17/08, Fowler, Jeff wrote:
Hello All,
I've used SQL Server for over 15 years, Oracle off & on when I have no
choice, but SQLite for a couple weeks. I've just learned (today) that
SQLite respects trailing spaces when comparing two character fields.
I.e. 'SQLITE' <> 'SQLITE '
On Thu, Jan 17, 2008 at 05:25:30PM -0500, Fowler, Jeff wrote:
> By the way.. I found this snippet. If I read it right, it seems that
> IGNORING trailing spaces during string comparisons is ANSI standard.
I'm not sure. I was always avoiding such problem by "trim"-ming everything
to be inserted;
' to be equivalent for
most comparison operations.
-Original Message-
From: Zbigniew Baniewski [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 17, 2008 5:20 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] SQLite character comparisons
On Thu, Jan 17, 2008 at 10:43:20AM -0500, Fowler, Jeff wrote
On Thu, Jan 17, 2008 at 10:43:20AM -0500, Fowler, Jeff wrote:
> I've used SQL Server for over 15 years, Oracle off & on when I have no
> choice, but SQLite for a couple weeks. I've just learned (today) that
> SQLite respects trailing spaces when comparing two character fields.
> I.e. 'SQLITE' <>
25 matches
Mail list logo