Solved

Oracle Regular Expression

Posted on 2010-09-21
4
866 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:Shinesh Premrajan
ID: 33724401
select * from tablename where regexp_like (goofy, '[0-9a-z]+','i');

Hope this helps
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 33724457
try these

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

or

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

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
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 video shows how to recover a database from a user managed backup

808 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