Solved

SELECT only non-numeric values in mysql column

Posted on 2008-10-14
2
2,068 Views
Last Modified: 2012-05-05
Hello,

A certain column in a mysql table has the follwoing records:

1E90HI
iMJ001
TR001
12091
GH248
90923
ASPLM
98998
012980
...

I want to run a SELECT statement that will show only alphanumeric and text values (see below). How do I do this?

1E90HI
iMJ001
TR001
GH248
ASPLM

0
Comment
Question by:Rick
2 Comments
 
LVL 39

Accepted Solution

by:
Roger Baklund earned 500 total points
ID: 22716005
You can use a regular expression. Try this:
SELECT * FROM MyTable WHERE MyCol REGEXP '[^0-9]';

Open in new window

0
 
LVL 13

Author Closing Comment

by:Rick
ID: 31506072
Thanks cxr!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

919 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