Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How can I retrieve rows beginning with either a "#" or a number?

Posted on 2015-02-23
3
Medium Priority
?
44 Views
Last Modified: 2015-02-23
I've got a table consisting of several hundred rows, all of them having a "term" column that can be easily sorted alphabetically with exception of 50 rows that have a term that starts with either a number or a "#" symbol.

How can I retrieve  just those rows that start with a number or the # sign?

Here's an example of the kind of data I'm talking about:

911 Surcharge
3DES
#BAL

What do you think?
0
Comment
Question by:brucegust
[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
3 Comments
 
LVL 1

Expert Comment

by:justaphase
ID: 40626004
Define your colletion records?
From MySQL, MsSQL a PHP Array?
0
 
LVL 44

Accepted Solution

by:
Chris Stanyon earned 2000 total points
ID: 40626178
If it's MySQL, then this'll do it:

SELECT column1, column2 FROM yourTable WHERE term REGEXP '^[0-9#]+';

Open in new window

0
 

Author Comment

by:brucegust
ID: 40626569
Perfect, Chris!

Thanks!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

719 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