Re: [sqlite] WHERE = does not work

2010-04-30 Thread Jim Morris
te> insert into t values('PSM'); >>> sqlite> insert into t values('psm'); >>> sqlite> select * from t where resourceType = 'PSM'; >>> PSM >>> sqlite> select * from t where resourceType like 'PSM'; >>> PSM >

Re: [sqlite] WHERE = does not work

2010-04-30 Thread Rashed Iqbal
: General Discussion of SQLite Database Subject: Re: [sqlite] WHERE = does not work 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 an

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 http://sqlite.org:8080/cgi-bin/mailman/list

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 > (except the NULLs on either

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 be

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: null chars in your dat

Re: [sqlite] WHERE = does not work

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

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 timeSta

Re: [sqlite] WHERE = does not work

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

Re: [sqlite] WHERE = does not work

2010-04-30 Thread Adam DeVita
where upper(resourceType) = 'PSM'; > > PSM > > psm > > > > Michael D. Black > > Senior Scientist > > Northrop Grumman Mission Systems > > > > > > > > > > From: sqlite-users-boun...@sqlite.org on

Re: [sqlite] WHERE = does not work

2010-04-30 Thread ecforu
re resourceType like 'PSM'; > PSM > psm > sqlite> select * from t where upper(resourceType) = 'PSM'; > PSM > psm > > Michael D. Black > Senior Scientist > Northrop Grumman Mission Systems > > > ____________ > > From:

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 * FROM MyTable WHERE res

Re: [sqlite] WHERE = does not work

2010-04-30 Thread Black, Michael (IS)
behalf of ecforu Sent: Fri 4/30/2010 8:31 AM To: 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

Re: [sqlite] WHERE = does not work

2010-04-30 Thread ecforu
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: sqlite-users@sq

Re: [sqlite] WHERE = does not work

2010-04-30 Thread Black, Michael (IS)
#x27;m using 3.6.23.1 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:22 AM To: sqlite-users@sqlite.org Subject: [sqlite] WHERE = does not work I have an sqlite

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 sqli

Re: [sqlite] WHERE = does not work

2010-04-30 Thread Timothy A. Sawyer
rg Subject: [sqlite] WHERE = does not work 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 * FROM MyTable WHERE resource

[sqlite] WHERE = does not work

2010-04-30 Thread ecforu
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 * FROM MyTable WHERE resourceType = 'PSM' --> returns nothing. SELECT * FROM MyTable W