Solved

Modify Sql Query ToSearch Any Part Of The Field

Posted on 2008-09-29
3
399 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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…
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 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

18 Experts available now in Live!

Get 1:1 Help Now