"Like" query

Benson112

Registered User.
Local time
Today, 18:24
Joined
Apr 17, 2008
Messages
21
Hi all,

I have a question regarding using "Like" within a query on access.

I use access to query our call logging system and produce reports. Within the call logging system I have a field called "Request area". In request area there are loads of options you can select.

I am trying to run a report which pulls back a number of these different options, which are all very similar:

A.A.A
A.A.B
A.A.C
A.A.D .....etc

So what I wanted to use in my query criteria was something along the lines of:

Like "A.A"

because A.A is a contant. But it doesnt seem to be giving me any results. Have i missed something here?

Thanks in advance
 
Like has to be used with a wilcard, in your case it would be:

Like "A.A*" or
Like "A.A.?"
 
Brilliant thanks for that.

Like "A.A*" worked a treat. Like "A.A.*?*" did not return any results.

The problem i have now is that it is returning other values that i dont want:

I get

Software.SA.x (which is what I am after)
Softarw.SAP.x (which i do not want!)

How do I get it to exclude the SAP results? I have tried Like "Software.SA.*" which doesnt return any results.
 
Brilliant thanks for that.

Like "A.A*" worked a treat. Like "A.A.*?*" did not return any results.

The problem i have now is that it is returning other values that i dont want:

I get

Software.SA.x (which is what I am after)
Softarw.SAP.x (which i do not want!)
How do I get it to exclude the SAP results? I have tried Like "Software.SA.*" which doesnt return any results.

I think the red part is a typo.
Are you sure that no space is added after the dot and that the filter criterea are between double quotes? So it looks like:
Code:
like "Software.SA.*"

A workaround could be:
Code:
like "Software.SA*" and not like "*sap*"
 
I think the red part is a typo.
Are you sure that no space is added after the dot and that the filter criterea are between double quotes? So it looks like:
Code:
like "Software.SA.*"

A workaround could be:
Code:
like "Software.SA*" and not like "*sap*"

Thanks mate, thats worked brilliantly
 
I think the red part is a typo.
Are you sure that no space is added after the dot and that the filter criterea are between double quotes? So it looks like:
Code:
like "Software.SA.*"
A workaround could be:
Code:
like "Software.SA*" and not like "*sap*"

Great suggestion, but the workaround assumes that there is no entries like Software.SAB.x, or Software.SAC.x, etc.

Using [ Like "Software.SA.*" ] is the best bet
 
Great suggestion, but the workaround assumes that there is no entries like Software.SAB.x, or Software.SAC.x, etc.

Using [ Like "Software.SA.*" ] is the best bet

Problem is that Like "Software.SA.*" returns no results. Using the work around about gives me the results I want but as you say it only caters for SAP...not anything else which starts with SA

I wonder why Like "Software.SA.*" doesnt work???
 

Users who are viewing this thread

Back
Top Bottom