Help in query

Creating desktop or client-server database solutions?

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
cbarbal
Posts: 100
Joined: Fri May 08, 2015 5:04 pm

Help in query

Post by cbarbal » Mon Nov 19, 2018 6:56 pm

Hi all,

I have the following formula that works for me

Code: Select all

   put "SELECT * FROM Finques WHERE finca LIKE '%" & pSearch & "%' OR municipi LIKE '%" & pSearch & "%'" into tQuery
   put textDecode(revDataFromQuery(tab, cr, gDatabaseID, tQuery),"UTF-8") into tData
   
 Result : C6C26524-7025-46D1-B93B-18889180031A	FIN001	Aldea Mar	Mollet
and I modified it by:

Code: Select all

put "SELECT * FROM Finques WHERE finca LIKE :1 OR municipi LIKE :1" into tQuery
   put textDecode(RevDataFromQuery(tab, cr, gDatabaseID, tQuery ,"pSearch"), "UTF-8") into tData
I do not get an error, but it does not return any results. Do not see the problem ...

Regards,

Carles

cbarbal
Posts: 100
Joined: Fri May 08, 2015 5:04 pm

Re: Help in query

Post by cbarbal » Mon Nov 19, 2018 7:40 pm

Hi,

The initial search was by "ald", in the first one it worked, but not in the second one. If I put "aldea mar", with the same letters of the value of field work in the second. Just that I removed a letter does not work. SQLite database

Regards,

Carles

cbarbal
Posts: 100
Joined: Fri May 08, 2015 5:04 pm

Re: Help in query

Post by cbarbal » Wed Nov 21, 2018 10:14 am

I already found it. I was missing this step

Code: Select all

put "%" & pSearch & "%" into pSearch

Post Reply

Return to “Databases”