Solved

MySQL query to exclude numeric results?

Posted on 2008-10-22
2
786 Views
Last Modified: 2012-06-22
Evening folks!

I have an interesting question. Is it possible to exclude results of a given type from a MySQL Query?

For example, if I wanted to find all locations for products that did NOT have a number in their name.

I.E.
(assume a simple table with just the 2 fields mentioned below, both varchar(20) )

SKU                LOCATION
---------------------------------
SKU1                SOD (included in the query output)
SKU2                34A (not included in the query output)
SKU3                ABC (included in the query output)
SKU4                CLO (included in the query output)
SKU5                CLO34A (not included in the query output)


Thanks!
0
Comment
Question by:jmoriarty
2 Comments
 
LVL 1

Accepted Solution

by:
nick_bal earned 500 total points
ID: 22783083
select * from tablename where location not REGEXP '[[:digit:]]';
0
 

Author Closing Comment

by:jmoriarty
ID: 31509065
Perfect! Thanks!
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

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

19 Experts available now in Live!

Get 1:1 Help Now