Solved

like keyword in Access

Posted on 2004-04-05
4
233 Views
Last Modified: 2006-11-17
i want to use like operator in MSAccess 2002. what should i do ? it is not working ?
any solution ?
the query is : "select * from emp where emp_name is like 'tom%'
thanks
0
Comment
Question by:realistic27
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 54

Accepted Solution

by:
nico5038 earned 40 total points
ID: 10756621
Try:
like 'Tom*'

Nic;o)
0
 
LVL 3

Expert Comment

by:SiJP
ID: 10756783
As per the above, when you are creating SQL statements in access you are not using TransactSQL, but JetSQL .. the % operator becomes *.

There are some differences between the two, so well worth checking for other statments you create, if they do error.

Full statement you need:

"SELECT * FROM emp WHERE emp_name LIKE 'tom*'"

or to use a variable:

"SELECT * FROM emp WHERE emp_name LIKE '*" & strVariable & "*'"
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question