Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Oracle Regular Expression

Posted on 2010-09-21
4
Medium Priority
?
903 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 2000 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

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…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
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…

972 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