gt; sqlite> insert into t values('psm');
>>> sqlite> select * from t where resourceType = 'PSM';
>>> PSM
>>> sqlite> select * from t where resourceType like 'PSM';
>>> PSM
>>> psm
>>> sqlite> select * from t where upper(res
To: General Discussion of SQLite Database
Subject: Re: [sqlite] WHERE = does not work
On 30 April 2010 16:56, ecforu <ecforus...@gmail.com> wrote:
> this was my first thought so I did a dump to a file and looked at in hex -
> there were no extra characters. I even tried looking at
Would this query help determine if any extraneous characters present?
SELECT * FROM MyTable
WHERE LENGTH(resourceType) <> 3
AND resourceType LIKE 'PSM' ;
___
sqlite-users mailing list
sqlite-users@sqlite.org
On 30 April 2010 16:56, ecforu wrote:
> this was my first thought so I did a dump to a file and looked at in hex -
> there were no extra characters. I even tried looking at the db file with a
> hex editor and I could see the PSM text and no extra characters around it
>
: Re: [sqlite] WHERE = does not work
this was my first thought so I did a dump to a file and looked at in hex -
there were no extra characters. I even tried looking at the db file with a
hex editor and I could see the PSM text and no extra characters around it
(except the NULLs on either side
Grumman Mission Systems
>
>
>
>
> From: sqlite-users-boun...@sqlite.org on behalf of ecforu
> Sent: Fri 4/30/2010 8:53 AM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] WHERE = does not work
>
>
>
> I don't think it is a case issue. See below f
On 30 April 2010 14:59, Adam DeVita wrote:
> Is it possible there is a null, tab, newline or other invisible character?
> Try
>
> select timeStamp, '' || resourceType || 'xx' From MyTable where
> resourceType like 'PSM' LIMIT 10;
>
Following from Adam's suggestion:
sqlite> select * from t where resourceType like 'PSM';
> > PSM
> > psm
> > sqlite> select * from t where upper(resourceType) = 'PSM';
> > PSM
> > psm
> >
> > Michael D. Black
> > Senior Scientist
> > Northrop Grumman Mission Systems
> >
Discussion of SQLite Database
Subject: Re: [sqlite] WHERE = does not work
I don't think it is a case issue. See below from sqlite3 command line.
Also one thing to note - I build the database from c API. I don't know if
that makes a difference.
sqlite>
sqlite> select timeStamp, resour
: Fri 4/30/2010 8:53 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] WHERE = does not work
I don't think it is a case issue. See below from sqlite3 command line.
Also one thing to note - I build the database from c API. I don't know if
that makes a difference.
sqlite>
sql
gt; > Michael D. Black
> > Senior Scientist
> > Northrop Grumman Mission Systems
> >
> >
> >
> >
> > From: sqlite-users-boun...@sqlite.org on behalf of ecforu
> > Sent: Fri 4/30/2010 8:31 AM
> > To: General Disc
PSM
> psm
> sqlite> select * from t where upper(resourceType) = 'PSM';
> PSM
> psm
>
> Michael D. Black
> Senior Scientist
> Northrop Grumman Mission Systems
>
>
>
>
> From: sqlite-users-boun...@sqlite.org on behalf of ec
On Fri, Apr 30, 2010 at 9:22 AM, ecforu wrote:
> I have an sqlite3 database which I can't query with WHERE =. I have to use
> WHERE like.
>
> Any ideas why this is?
>
> For example I have a resourceType column that has as some of its entries
> (over 50) 'PSM'.
>
> SELECT *
General Discussion of SQLite Database
Subject: Re: [sqlite] WHERE = does not work
But the like WHERE clause works the way it is. Its the = that isn't
working. I would rather use = than like. I'm just using like for now
because it works.
Thanks
On Fri, Apr 30, 2010 at 9:29
But the like WHERE clause works the way it is. Its the = that isn't
working. I would rather use = than like. I'm just using like for now
because it works.
Thanks
On Fri, Apr 30, 2010 at 9:29 AM, Timothy A. Sawyer <
tsaw...@mybowlingdiary.com> wrote:
> With the like clause you have to use the
Apparently you must by typeing something wrong.
This works for me:
create table t(resourceType varchar);
insert into t values('PSM');
select * from t where resourceType = 'PSM';
PSM
select * from t where resourceType like 'PSM';
PSM
Does this work for you?
I'm using 3.6.23.1
Michael D.
Ecforu,
Re: What's the diff?
In sqlite, LIKE without a "%" (percent-sign ) would be a case-insensitive
search, whereas == would be case-sensitive.
sqlite> select 'cat' like 'CAT';
1
sqlite> select 'cat' == 'CAT';
0
___
sqlite-users mailing list
With the like clause you have to use the % sign as a wildcard. So resourceType
LIKE %'PSM' returns anything ending in PSM. The SQLite website has excellent
docs on standard SQL.
-Original Message-
From: ecforu
Sent: Friday, April 30, 2010 09:22
To:
18 matches
Mail list logo