Página 1 de 1

Whow quering for a substring into a field in SQLite

Publicado: Dom Sep 22, 2013 8:45 am
por Dionisis Divaris
Dear friends
I use the following statement for quering in SQLite:

" SELECT * FROM PestControl WHERE Customer glob '"+ Value +"*'"

But this works only if the value is from the start of the field to the n-Len(value) character. I want to search ANYWHERE in the field for a match. What statement should i use. I use greek and international characters mixed for the customer field.
Any help would be appreciated

Whow quering for a substring into a field in SQLite

Publicado: Dom Sep 22, 2013 12:37 pm
por jfgimenez
Dionisis,
> Dear friends
>
> I use the following statement for quering in SQLite:
>
> " SELECT * FROM PestControl WHERE Customer glob '"+ Value
> +"*'"
>
> But this works only if the value is from the start of the
> field to the n-Len(value) character. I want to search
> ANYWHERE in the field for a match. What statement should i
> use. I use greek and international characters mixed for the
> customer field.
>
> Any help would be appreciated
Just put another asterisk (*) at the beggining of the string:
"SELECT * FROM PestControl WHERE Customer GLOB '*" + Value + "*'"
Here you are the sqlite doc: http://www.sqlite.org/lang_expr.html#like
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info

Whow quering for a substring into a field in SQLite

Publicado: Dom Sep 22, 2013 4:38 pm
por Dionisis Divaris
Many Thanks Jose
What is the best to use for the direct reflection of rows that afected from a select statement (TSQLQuery, TSQLTable, or TMemDataSet) a small example would be appreciated.
Before 3 days i send to your sales department the invoice for FastReport for [x]Harbour from Sergrei Spirin (Rest In Peace). I did'nt have any answer yet, if i gain the 100€ discount to buy the FastReport for Xailer or continue using the old one (from Sergei) that i have. Please take a look for that and wating your answer.
All the best to you and the rest of the team.

Whow quering for a substring into a field in SQLite

Publicado: Lun Sep 23, 2013 10:40 am
por ignacio
Dionisis Divaris escribió el dom, 22 septiembre 2013 16:38Many Thanks Jose
What is the best to use for the direct reflection of rows that afected from a select statement (TSQLQuery, TSQLTable, or TMemDataSet) a small example would be appreciated.
Before 3 days i send to your sales department the invoice for FastReport for [x]Harbour from Sergrei Spirin (Rest In Peace). I did'nt have any answer yet, if i gain the 100€ discount to buy the FastReport for Xailer or continue using the old one (from Sergei) that i have. Please take a look for that and wating your answer.
All the best to you and the rest of the team.

Please wait until the product is officially published. TIA.
Best regards,