Discussion Locked

Access 2000 Simple Query

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I imported a database written in some other database product. There is a field called code.
Some of the typical entries are:
* *T * S T S

I've tried to get the query to find the * entries or the *T or *S entries. But access keeps presuming that the * is a like clause and gets the wrong records.

I've already tried Single quotes and double quotes with NO SUCCESS.

Any help you can offer would be greatly appreciated!

Thanks,
Alan

5 replies

by techrep

I am surprised you are having trouble with this since the follow query works fine for me with some test data:

select * from tablename where field1 = '*'

If that doesn't work, substitute the character code value (*=42) like this:

select * from tablename where field1 = chr(42)

That works fine, too.

by mra2

I tried where field = '*' in SQL view then went to Access Query view and found out you have to put an = sign otherwise '*' comes up as like... YOU WERE A GREAT HELP and your answer was VERY WELL EXPLAINED.
Thanks for your help!!!!!!!!!!! Alan

This discussion is closed to new replies.