thanks for your help
I got my work done
ritesh
Mon, 2005-12-05 at 17:11, Rob Lohman wrote:
It seems we are both right :)
sqlitecreate table test (filename varchar(1000) primary key);
sqliteinsert into test (filename) values ('test');
sqliteselect * from test where filename='test';
test
sqliteselect * from test where filename='tesT';
sqliteselect * from test where filename like 'tesT';
test
sqliteinsert into test (filename) values ('testing');
sqliteselect * from test where filename like 'tesT';
test
In other words, when doing field = 'value' it is case sensitive,
with a field like 'value' it isn't. If you don't use '%value%' it
will do an exact match (it seems).
This was tested on 3.2.1
Message
From: "Brandon, Nicholas" <nicholas.brandon (AT) baesystems (DOT) com>
To: <sqlite-users (AT) sqlite (DOT) org>
Sent: Monday, December 05, 2005 12:15 PM
Subject: RE: [sqlite] Regarding String Comparision
Rob/Ritesh
>
>>Also keep in mind that such a search is CASE SENSITIVE.
>>There are two solutions to that, either makes the collation
>>case insensitive or do a:
>
I don't have access to SQLite immediately but I seem to remember in one of
my applications that the use of
select * from test where filename like '%file%';
would return string that are case INsensitive. (ie 'file', 'FILE', 'File'
)
Ritesh I would suggest that you confirm this before relying on it.
Regards
Nick
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.