0

I have a query to seek data from SQLite for SEARCH realization in java project. I need that both variant with upper and lower first letters were true while making the query from SQLite. The query I make is such:

String sqlQuery1 = "SELECT * FROM city AS t1, region AS t2 ON t1.region_number = t2._id WHERE t1.name LIKE '%' || ? || '%';";

Then I put it in the next method:

  public Cursor fetchRecordsByQuery(String query) {
      return  myDataBase.rawQuery(sqlQuery1, new String[] {query});
  }

I need that the query was not case sensetive. That both results with lower case and upper case first buttons were true. How to make it? one thing - the symbols are russian.

SergeiK
  • 63
  • 11

1 Answers1

0

If I understand it right, then you could do something like lower(t1.name) LIKE (something in lower case)

Steve
  • 10,544
  • 6
  • 29
  • 66