like operator in a query

cpampas

Registered User.
Local time
Today, 09:53
Joined
Jul 23, 2012
Messages
221
Hello, I would appreciate your help with the folowing :
my query returns these records

maqId descMaq
---------------------------------------------
10 Komatsu PC 130-7K
25 Komatsu PC 130 LC-8
40 Komatsu PC 30
55 Komatsu PC 230LC-6
60 Komatsu PC 130-7K
85 Komatsu PC 130 LC-8
90 Komatsu PC 30MR-3
91 Komatsu PC 30-6

the condition that I set in my query was:

Code:
Like '*komatsu*' And Like '*pc*' And Like '*30*'

I want to get only records numbered 40, 90,91 ( those related to the specific machine Komatsu PC 30)
removing the asterix *, before the string 30 , does not return the desired result ( Like '*komatsu*' And Like '*pc*' And Like '30*')
Is there a way to do this ?
Thanks
 
(' ' & [descMaq] & ' ') Like '* komatsu *' And (' ' & [descMaq] & ' ') Like '* pc *' And (' ' & [descMaq] & ' ') Like '* 30 *'
 
hummmm
why didnt I think about that? (y)
Thanks Arnelgp
 

Users who are viewing this thread

Back
Top Bottom