Re: [sqlite] WHERE = does not work

2010-04-30 Thread Jim Morris
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

Re: [sqlite] WHERE = does not work

2010-04-30 Thread Rashed Iqbal
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

Re: [sqlite] WHERE = does not work

2010-04-30 Thread Griggs, Donald
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

Re: [sqlite] WHERE = does not work

2010-04-30 Thread Simon Davies
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

2010-04-30 Thread Black, Michael (IS)
: 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

Re: [sqlite] WHERE = does not work

2010-04-30 Thread ecforu
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

Re: [sqlite] WHERE = does not work

2010-04-30 Thread Simon Davies
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:

Re: [sqlite] WHERE = does not work

2010-04-30 Thread Richard Hipp
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 > >

Re: [sqlite] WHERE = does not work

2010-04-30 Thread Black, Michael (IS)
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

Re: [sqlite] WHERE = does not work

2010-04-30 Thread Black, Michael (IS)
: 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

Re: [sqlite] WHERE = does not work

2010-04-30 Thread Adam DeVita
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

Re: [sqlite] WHERE = does not work

2010-04-30 Thread ecforu
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

Re: [sqlite] WHERE = does not work

2010-04-30 Thread Richard Hipp
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 *

Re: [sqlite] WHERE = does not work

2010-04-30 Thread Black, Michael (IS)
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

Re: [sqlite] WHERE = does not work

2010-04-30 Thread ecforu
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

Re: [sqlite] WHERE = does not work

2010-04-30 Thread Black, Michael (IS)
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.

Re: [sqlite] WHERE = does not work

2010-04-30 Thread Griggs, Donald
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

Re: [sqlite] WHERE = does not work

2010-04-30 Thread Timothy A. Sawyer
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: