[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How would I use SQL to filter results based on keywords?

Posted on 2009-04-18
1
Medium Priority
?
149 Views
Last Modified: 2012-05-06
I am trying to filter through results in a field called description. My sql statement is

SELECT * FROM PRODUCT WHERE [desc] LIKE '%blue%';

This should select any record that has the color blue in its description, but for some reason it will not work. Am I doing this right?
0
Comment
Question by:AlexanderMaxwell
1 Comment
 
LVL 25

Accepted Solution

by:
lwadwell earned 500 total points
ID: 24177795
Hi AlexanderMaxwell,

In a lot of dbms's yes.  In MS Access no. Try LIKE '*blue*' ... i.e. use * instead of %.

lwadwell
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction Hopefully the following mnemonic and, ultimately, the acronym it represents is common place to all those reading: Please Excuse My Dear Aunt Sally (PEMDAS). Briefly, though, PEMDAS is used to signify the order of operations (http://en.…
Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

830 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