Solved

Modify Sql Query ToSearch Any Part Of The Field

Posted on 2008-09-29
3
402 Views
Last Modified: 2010-04-21
I need to modify the following query so that it will find John Smith or John or Smith or John Henry Smith in text20
I need to modify the following query so that it will find John Smith or John or Smith or John Henry Smith

 

 

 

SELECT Customer.CustNo, Customer.Customer, Customer.Address, Customer.City, Customer.State, Customer.ZipCode, Customer.Phone, Customer.Contact, Customer.CustOther, Customer.Art

FROM Customer

WHERE (((Customer.Customer) Like [Forms]![Customer]![text20]));

Open in new window

0
Comment
Question by:mickeyshelley1
  • 2
3 Comments
 
LVL 59

Accepted Solution

by:
Kevin Cross earned 500 total points
ID: 22602468
Try this:
SELECT Customer.CustNo, Customer.Customer, Customer.Address, Customer.City, Customer.State, Customer.ZipCode, Customer.Phone, Customer.Contact, Customer.CustOther, Customer.Art

FROM Customer

WHERE (((Customer.Customer) Like "*" & [Forms]![Customer]![text20] & "*"));

Open in new window

0
 

Author Closing Comment

by:mickeyshelley1
ID: 31501441
Thanks that did the trick
0
 
LVL 59

Expert Comment

by:Kevin Cross
ID: 22602648
You are welcome.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

895 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now