using the keyword "LIKE" with SELECT not working

G

Guest

Hi,
I have created a db with the following contents. Table Name: "EMPLOYEE"

LASTNAME FIRSTNAME AREACODE PHONE ST ZIP
--------------- ---------------- -------- -------- -- ------
BUNDY AL 100 555-1111 IL 22333
MEZA AL 200 555-2222 UK 234324

when i give the query SELECT * FROM EMPLOYEE WHERE LASTNAME LIKE 'M%'
it doesnt return the MEZA record.

but the query SELECT * FROM EMPLOYEE WHERE LASTNAME LIKE 'MEZA'
runs fine..

I dont see any problem with the first query. Someone please clarify.

Thanks,
Vijender Reddy


----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...3b3e8502d6&dg=microsoft.public.access.queries
 
R

RoyVidar

pacman wrote in message
Hi,
I have created a db with the following contents. Table Name: "EMPLOYEE"

LASTNAME FIRSTNAME AREACODE PHONE ST ZIP
--------------- ---------------- -------- -------- -- ------
BUNDY AL 100 555-1111 IL 22333
MEZA AL 200 555-2222 UK 234324

when i give the query SELECT * FROM EMPLOYEE WHERE LASTNAME LIKE 'M%'
it doesnt return the MEZA record.

but the query SELECT * FROM EMPLOYEE WHERE LASTNAME LIKE 'MEZA'
runs fine..

I dont see any problem with the first query. Someone please clarify.

Thanks,
Vijender Reddy


----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...3b3e8502d6&dg=microsoft.public.access.queries

The usual wildcard in Access is * not %. % is used for instance when
working with ADO.
 
G

Guest

yes thats right.. it works. thanks!

RoyVidar said:
pacman wrote in message


The usual wildcard in Access is * not %. % is used for instance when
working with ADO.
 

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