Search for a word in a memo field ?

S

SpookiePower

I have a memo field, that holds some text.
I would like to search for some words in this field,
and have done it this way -

SELECT * FROM Table
WHERE field like '%word%'

- but it does not receive any records.
I know that the word I'm searching for, exist in the
table.

Have I done something wrong ?
 
K

Keith Wilby

SpookiePower said:
I have a memo field, that holds some text.
I would like to search for some words in this field,
and have done it this way -

SELECT * FROM Table
WHERE field like '%word%'

- but it does not receive any records.
I know that the word I'm searching for, exist in the
table.

Try

WHERE field like "*word*"

or

WHERE field like "*" & "word" & "*"

Keith.
www.keithwilby.com
 
J

John Spencer

Access uses non-compliant wild card characters.
? = any one character;
* = any number (0 up) of characters
# = any number character

Standard SQL (ANSI 92) uses
_ = any one character
% = any number (0 up) of characters


--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 

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