Find literal *

B

bill

I'm trying to find occurrences of * in my data, but all I get is the wildcard
use. Is there any way around this? Thnaks in advance........bill
 
G

Gary Walter

bill said:
I'm trying to find occurrences of * in my data, but all I get is the
wildcard
use. Is there any way around this? Thnaks in advance........bill

Use brackets around wildcard

WHERE somefield LIKE "[*]"
 
J

John W. Vinson

I'm trying to find occurrences of * in my data, but all I get is the wildcard
use. Is there any way around this? Thnaks in advance........bill

To find a literal wildcard character (*, #, ? and so on) enclose it in
square brackets. E.g., to find all records containing an asterisk
anywhere in a text field use a criterion

LIKE "*[*]*"

The first and last asterisks are wildcards matching any string; the
one in brackets is taken literally.

John W. Vinson [MVP]
 
G

Gary Walter

Thank you John. I hope bill did not waste much time
I'm trying to find occurrences of * in my data, but all I get is the
wildcard
use. Is there any way around this? Thnaks in advance........bill

To find a literal wildcard character (*, #, ? and so on) enclose it in
square brackets. E.g., to find all records containing an asterisk
anywhere in a text field use a criterion

LIKE "*[*]*"

The first and last asterisks are wildcards matching any string; the
one in brackets is taken literally.

John W. Vinson [MVP]
 
B

bill

Thank you John & Gary. Worked great.

I had tried the brackets earlier, but missed the wildcard in front &
back.......bill

John W. Vinson said:
I'm trying to find occurrences of * in my data, but all I get is the wildcard
use. Is there any way around this? Thnaks in advance........bill

To find a literal wildcard character (*, #, ? and so on) enclose it in
square brackets. E.g., to find all records containing an asterisk
anywhere in a text field use a criterion

LIKE "*[*]*"

The first and last asterisks are wildcards matching any string; the
one in brackets is taken literally.

John W. Vinson [MVP]
 
Top