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
Solved

like keyword in Access

Posted on 2004-04-05
4
223 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
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
corrupt Databases 9 65
Sum in Split Form 17 28
Importing Excel file into Access 5 27
Pass Variable Form Name to another form in Access 16 20
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

828 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