Solved

SELECT only non-numeric values in mysql column

Posted on 2008-10-14
2
2,066 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

I use MySQL for many of my development projects in a Windows environment. To manage my databases (and perform queries) for years I used a tool called MySQL administrator.  This tool has since been replaced by MySQL Workbench. So I decided to m…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
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…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 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