Oracle RegExp to find a row with a special character...

Posted on 2014-08-12
Last Modified: 2014-08-12

I have a problem with an application that appears to be data driven. It looks like there must be a special character in a field in the query for the application that is causing an error in the application.

Can someone help me write a regular expression query to find all rows that include special characters?

Something like...

Select * from
(select upper(chr(300))||'0' a from dual)
where regexp_like(a,'[^a-zA-Z0-9\-\@\<\>]');

I'm not really sure what I'm looking for. I'm hunting for a goofy character that's breaking the app.
Question by:gswitz
    LVL 13

    Assisted Solution

    by:Alexander Eßer [Alex140181]
    Have you already tried Posix character classes (like "[:cntrl:]"), as shown here for instance?!
    LVL 73

    Accepted Solution

    what you have should work

    here's another method, this will let you search through individual characters causing the problem

    SELECT *
              FROM yourtable,
                       (    SELECT COLLECT(LEVEL)
                              FROM DUAL
                        CONNECT BY LEVEL <= LENGTH(yourtable.a))

    Author Closing Comment


    Featured Post

    Gigs: Get Your Project Delivered by an Expert

    Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

    Join & Write a Comment

    Suggested Solutions

    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…
    Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
    This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
    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

    755 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

    22 Experts available now in Live!

    Get 1:1 Help Now