Using Reg Ex

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DaveRook
    New Member
    • Jul 2007
    • 147

    Using Reg Ex

    Hi

    I've done this is MsSql, but this won't work in Oracle.

    In MsSql, a simple

    WHERE ColumnName LIKE '[L][1-9]%'

    will return L1, L2, L3, L4 etc

    How do I do this with Oracle

    Thank you

    Dave
  • rski
    Recognized Expert Contributor
    • Dec 2006
    • 700

    #2
    Use regexp
    Code:
    select * from table where regexp_like(ColumnName,'L[1-9]')
    If it does not work because you have older oracle version (oracle introduced regexp functions in version 10 or 11) you can try to use owa_pattern package to do the same regexp match.

    Comment

    Working...