Hi all.
I have a database,in Base,working well with the instruction ... SELECT * FROM Table WHERE Column LIKE :input || '%'
But the same command,when I use Openoffice Base as a client,with MySQL(local), returns me the exactly value of (:input) only!So if I introduce just the first character,
I do not find anything.Can someone help?Thanks.
[Solved] Incorrect work of LIKE-instruction with MySQL
-
- Posts: 32
- Joined: Wed Apr 30, 2014 2:08 am
[Solved] Incorrect work of LIKE-instruction with MySQL
Last edited by vladboscaneanu on Tue May 27, 2014 3:47 am, edited 1 time in total.
LibreOffice last version on Windows 10
Re: Incorrect work of LIKE-instruction with MySQL
vladboscaneanu:
Please try the following Query:
Explanation: In the above, I am using the MySQL standard for concatenation with the CONCAT function. Since, if I understand, you want to find any input that starts with whatever is entered . . . including the CONCAT function to string together what is entered, followed the the text string '%' I think / hope will meet your needs.
I hope this helps, please be sure to let me / us know.
Sliderule
Thanks to ad [Solved] in your 1st post Subject (edit buton top right) if this isue has ben resolved.
Please try the following Query:
Code: Select all
SELECT * FROM Table WHERE Column LIKE CONCAT(:input, '%')
I hope this helps, please be sure to let me / us know.
Sliderule
Thanks to ad [Solved] in your 1st post Subject (edit buton top right) if this isue has ben resolved.
-
- Posts: 32
- Joined: Wed Apr 30, 2014 2:08 am
Re: [Solved]Incorrect work of LIKE-instruction with MySQL
Thank a lot,my friend.
Have a good time.
Have a good time.
LibreOffice last version on Windows 10