Column with value of *, how to specify as criteria in query?

G

glen_esq

Hello everyone.

Is there some way to search for the value of '*' in a column?

I have a sql server table linked in my access database which has a column
containing values of '*' and '?' , and 'C' And 'P'..

I need to create an access query that searches for the values of '*' and
a 2nd query that searches for value '?' in this column.

The problem I'm having is that * and ? are wildcard characters in access.
If I specify '*' in the search criteria in the query, all rows are
returned in the table - all values for the column including the values of
'C' and 'P'.... where all I want are the rows with a value of '*' for that
column.

Any help is appreciated.

Glen
 
A

Allen Browne

Try placing the asterisk in square brackets.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.


Hello everyone.

Is there some way to search for the value of '*' in a column?

I have a sql server table linked in my access database which has a column
containing values of '*' and '?' , and 'C' And 'P'..

I need to create an access query that searches for the values of '*' and a
2nd query that searches for value '?' in this column.

The problem I'm having is that * and ? are wildcard characters in access. If
I specify '*' in the search criteria in the query, all rows are returned in
the table - all values for the column including the values of 'C' and
'P'.... where all I want are the rows with a value of '*' for that column.

Any help is appreciated.

Glen
 
L

Lynn Trapp

Make sure that you put an equal sign (=) in front of your criteria:

="*"

Otherwise it assumes LIKE

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm




Hello everyone.

Is there some way to search for the value of '*' in a column?

I have a sql server table linked in my access database which has a column containing values of '*' and '?' , and 'C' And 'P'..

I need to create an access query that searches for the values of '*' and a 2nd query that searches for value '?' in this column.

The problem I'm having is that * and ? are wildcard characters in access. If I specify '*' in the search criteria in the query, all rows are returned in the table - all values for the column including the values of 'C' and 'P'.... where all I want are the rows with a value of '*' for that column.

Any help is appreciated.

Glen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top