?
Solved

like keyword in Access

Posted on 2004-04-05
4
Medium Priority
?
244 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 160 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

650 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