Solved

SQL Query

Posted on 2009-07-09
4
216 Views
Last Modified: 2012-05-07
Hey Experts!
I need to write a SQL query to filter out some records. I need all records that start with "MED" and are 8 characters long.
 
something along the lines of:
 
select * from TABLE where len(RECORD) = 8 and Begins with "MED"
 
Urgent! Thanx!!!

Open in new window

0
Comment
Question by:calbackup
[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
4 Comments
 
LVL 39

Accepted Solution

by:
Pratima Pharande earned 500 total points
ID: 24820384
select * from TABLE where len(RECORD) = 8 and RECORD like '%MED?%'
0
 
LVL 39

Expert Comment

by:Pratima Pharande
ID: 24820396
select * from TABLE where len(RECORD) = 8 and RECORD like 'MED%'
0
 
LVL 39

Expert Comment

by:Pratima Pharande
ID: 24820399
RECORD is nothing but you filed name that you want to check for length and start characters
0
 

Author Closing Comment

by:calbackup
ID: 31601945
Thanx dude! worked like a charm
0

Featured Post

Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

Question has a verified solution.

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

If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

615 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