Hi all,
How can one get SQLite to return an exact match from a query,...the equivalent of ‘==‘ ?
SQLite Exact match
Moderator: Rathinagiri
- dragancesu
- Posts: 819
- Joined: Mon Jun 24, 2013 11:53 am
- DBs Used: DBF, MySQL, Oracle
- Location: Subotica, Serbia
- Has thanked: 30 times
- Been thanked: 233 times
Yes or No, depending what you want
Query result can be number, character or array, big array
If your query result is number or character answer is Yes
otherwise is No
Query result can be number, character or array, big array
If your query result is number or character answer is Yes
otherwise is No
- karweru
- Posts: 213
- Joined: Fri Aug 01, 2008 1:51 pm
- DBs Used: DBF,mysql,mariadb,postgresql,sqlite,odbc
- Has thanked: 1 time
- Been thanked: 10 times
- Contact:
I need for strings,
This query also returns instances where payr_code is capital ‘C’. I need it to only return small ‘c’ instances.
Code: Select all
select account_code from payr where payr_code=‘c’;
Kind regards,
Gilbert.
Gilbert.
- dragancesu
- Posts: 819
- Joined: Mon Jun 24, 2013 11:53 am
- DBs Used: DBF, MySQL, Oracle
- Location: Subotica, Serbia
- Has thanked: 30 times
- Been thanked: 233 times
https://sqlite.org/lang_corefunc.html
see function lower
select lower(account_code) from payr where payr_code=‘c’;
see function lower
select lower(account_code) from payr where payr_code=‘c’;
- karweru
- Posts: 213
- Joined: Fri Aug 01, 2008 1:51 pm
- DBs Used: DBF,mysql,mariadb,postgresql,sqlite,odbc
- Has thanked: 1 time
- Been thanked: 10 times
- Contact:
Thank you dragancesu,
Not exactly what I require. The problem is after WHERE. It would appear the EQUAL operator (=) is case insensitive,...can't find a way to force it to recognize case such that 'C' is not equal to 'c'
Not exactly what I require. The problem is after WHERE. It would appear the EQUAL operator (=) is case insensitive,...can't find a way to force it to recognize case such that 'C' is not equal to 'c'
Kind regards,
Gilbert.
Gilbert.
- dragancesu
- Posts: 819
- Joined: Mon Jun 24, 2013 11:53 am
- DBs Used: DBF, MySQL, Oracle
- Location: Subotica, Serbia
- Has thanked: 30 times
- Been thanked: 233 times
I don't use SQLite but you can find resolve your problem
https://stackoverflow.com/questions/973 ... -comparing
SELECT * FROM ... WHERE name = 'someone' COLLATE NOCASE
https://stackoverflow.com/questions/973 ... -comparing
SELECT * FROM ... WHERE name = 'someone' COLLATE NOCASE
Hi,
I am sure you must have searched in Google for an option. When I searched use of "Glob" function has come up.
Please see discussion here:
https://stackoverflow.com/questions/223 ... -sensitive
Hope that helps.
Warm regards,
Jayadev
I am sure you must have searched in Google for an option. When I searched use of "Glob" function has come up.
Please see discussion here:
https://stackoverflow.com/questions/223 ... -sensitive
Hope that helps.
Warm regards,
Jayadev