* in queries

  • Thread starter Thread starter asmine
  • Start date Start date
A

asmine

I am working on a file that uses * & ** as values in a
certain field Since I need to run queries and make reports
based on these I have to find a way to make Access see
these as values and not wildcards, any suggestions?
Thanks
 
If you are using any comparison operator other then like, there is no problem.

If you are using LIKE as the comparison operator then

LIKE "[*]" will find the records where the field = just one asterisk

LIKE "[*][*]" will find the records where the field = just two asterisks

LIKE "*[*][*]*" will find the records where the field contains two consecutive asterisks

In other words, you can surround a wild card with [] and it will be treated as a
character when you use the LIKE operator.
 
Thanks John The only other thing I had to do was put in
the spaces before the [*] so what worked was Like" [*]
[*]" Thanks again
J
-----Original Message-----
If you are using any comparison operator other then like, there is no problem.

If you are using LIKE as the comparison operator then

LIKE "[*]" will find the records where the field = just one asterisk

LIKE "[*][*]" will find the records where the field = just two asterisks

LIKE "*[*][*]*" will find the records where the field
contains two consecutive asterisks
In other words, you can surround a wild card with [] and it will be treated as a
character when you use the LIKE operator.
I am working on a file that uses * & ** as values in a
certain field Since I need to run queries and make reports
based on these I have to find a way to make Access see
these as values and not wildcards, any suggestions?
Thanks
.
 
Back
Top