Solved

Oracle Regular Expression

Posted on 2010-09-21
4
846 Views
Last Modified: 2013-12-07
I need to select, from an Oracle table, only the rows in which the column GOOFY contains AT LEAST one character different from:
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
and space

How can I achieve this?
0
Comment
Question by:hc2342uhxx3vw36x96hq
  • 2
4 Comments
 
LVL 17

Expert Comment

by:shinuq
ID: 33724401
select * from tablename where regexp_like (goofy, '[0-9a-z]+','i');

Hope this helps
0
 
LVL 73

Expert Comment

by:sdstuber
ID: 33724457
try these

regexp_like(goofy,'[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ]');

or

regexp_like(goofy,'[^a-zA-Z0-9 ]')
0
 
LVL 73

Accepted Solution

by:
sdstuber earned 500 total points
ID: 33724535
shinuq,  

your expression will find strings that have at least one digit or letter.

the question asks to find strings with something OTHER than those characters or a space.
0
 
LVL 1

Author Closing Comment

by:hc2342uhxx3vw36x96hq
ID: 33733275
Thank you very much for your kind cooperation!
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.

Join & Write a Comment

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

707 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

21 Experts available now in Live!

Get 1:1 Help Now