In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

Whow quering for a substring into a field in SQLite

Xailer professional forum in English
Responder
Avatar de Usuario
Dionisis Divaris
Mensajes: 484
Registrado: Jue Jul 12, 2007 8:48 pm
Ubicación: Athens Greece

Whow quering for a substring into a field in SQLite

Mensaje 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
T.I.A
Dionisis
SGS-soft
support.sgs@gmail.com
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5707
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

Whow quering for a substring into a field in SQLite

Mensaje 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
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Avatar de Usuario
Dionisis Divaris
Mensajes: 484
Registrado: Jue Jul 12, 2007 8:48 pm
Ubicación: Athens Greece

Whow quering for a substring into a field in SQLite

Mensaje 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.
T.I.A
Dionisis
SGS-soft
support.sgs@gmail.com
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9259
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Whow quering for a substring into a field in SQLite

Mensaje 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,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Responder