android - SQLlite like statement replace space with special char -


I have a SQLlite database with a list of cities. My free full text visit is associated with this database but I have a there is a problem.

There are so many cities in my database like this:

Sint-Truinyen
Sint-Peter-Road
Sint-Rikkers etc. ... < P> But many users will not type Sint Truden or get results.

This is what I have done so far:

  string sql = ""; Sql + Select "+ +" + TABLE_CITIES; Sql + = "WHERE" + KEY_NAME + "Preferred"% "+ SearchTerm +"% '";   

To achieve your goal How can I adjust my SQL for?

search term for a solution and Database content is normalized For example, you can add a column named normalized name to the table. Some common examples:

  • Any type of separator with a location (D Sh, point, change multiple locations)
  • Convert to lowercase


Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -