1

I have used the following query for sqlite3 update.

UPDATE customer SET nameid = '0' where (a like '%aba%' or  b like '%aba%' or  c like '%aba%' or  d like '%aba%')  COLLATE NOCASE.

But In my tables, the respected column stores the value like ABA,Aba,ABa,aBA. I want to make update query with case insensitive. Kindly guide me , what mistake i have done.

The above query is not updating the tables.

THanks

Finder
  • 8,259
  • 8
  • 39
  • 54

1 Answers1

1

Try using the followin query:

UPDATE customer SET nameid = '0' where (LOWER(a) like '%aba%' or LOWER(b) like '%aba%' or LOWER(c) like '%aba%' or LOWER(d) like '%aba%')

Here is the link for similar question: Case sensitive and insensitive like in SQLite

Community
  • 1
  • 1
Stropharius
  • 148
  • 3
  • Hi, I could not use Lower and upper case method. because the '%aba%' will receive from the server. Sometimes they will pass lower/upper/mixed. I want to check the characters alone not cases. – Finder Apr 08 '14 at 10:00
  • You can use LOWER in like as well: '... like LOWER('%abc%')' – Stropharius Apr 08 '14 at 10:06