Subject |
Re: select - like |
From |
Mervyn Bick <invalid@invalid.invalid> |
Date |
Sat, 1 Oct 2022 09:38:10 +0200 |
Newsgroups |
dbase.getting-started |
On 2022/10/01 09:08, Helen Prior wrote:
> Hi Folks
> Can anyone help me please?
> I an trying to create a select 'like' statement
>
> Form.DAILYLOG2.sql = [select * from DAILYLOG where Keyevent like '%] + Vkeyevent + [%'] or History like ['%] +Vkeyevent + [%']
> The first 'Keyevent' works fine but when I try and add History it does not.
>
> Could someone please put me on the right track?
> Regards
> Helen
Building commands into strings can be tricky. It's a matter of getting
the delimiters for the various sections in the correct places. It helps
to print the string before you try to execute it. Once it works the
print statement can be deleted.
Form.DAILYLOG2.sql = [select * from DAILYLOG where Keyevent like '%] +
Vkeyevent + [%' or History like '%] +Vkeyevent + [%']
Mervyn
|
|