Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SELECT only non-numeric values in mysql column

Posted on 2008-10-14
2
Medium Priority
?
2,077 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 39

Accepted Solution

by:
Roger Baklund earned 2000 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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

610 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