Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

search colums and return row problem

Status
Not open for further replies.

jknape

Programmer
Mar 7, 2002
1
US
I am trying in Access with SQL to search a column and return the rows.

My search is to search a column and find all the cells that have "C" in them and return that whole row. My SQL works right now and returns rows were just "C" is in the column,, but I want rows that also have "C" in it like "ABC".

I used the InStr() function, but that did not work. Any body have any suggestions?

Thanks,
Jay
 
Hi Jay!

Try this:

Select * From YourTable Where YourField Like *C*

hth
Jeff Bridgham
bridgham@purdue.edu
 
Try LIKE *C* as a criteria....

The INSTR function just tells you WHERE in a string a particular character is. You'd need to have your criteria be something like

=Instr(myField,"C") > 0

I don't know about you, but I think the LIKE guy is a little clearer... Jim Hare
"Remember, you're unique - just like everyone else"
Feel free to visit another free Access forum:
or my site,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top