samedi 15 août 2015

SQlite: Find closest match (String) in a table with sentences and variations

I'm currently trying to figure out what the best SQL query would look like to find a row with a static sentence(text) based on a dynamic sentence with multiple variations. Here is an example:

tbl_questions:

iQuestionID, sQuestion
1, "how was your day"
2, "what is your name"
3, "how old are you"

so the search string

"what name do you have"

should return the second row. or

"so, tell me how old you are"

should return the third row.

Is a SQL query similar to this problem possible without complex search algorithms on code base?

Aucun commentaire:

Enregistrer un commentaire