Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2004
    Location
    India
    Posts
    191

    Question Unanswered: Help On Sql query

    Hi,

    Could you please help me on this:
    I have one varchar2 column. It has values like
    ______
    12345
    12a23
    12b23c
    4500
    ....
    ....
    ....

    I need to write a sql query in such way that it should only select number values (without any character) and
    not values which has character in it.
    i.e
    Need to select only :
    12345
    4500

    Thanks In Advance
    Pagnint
    (No need to search web before posting new question)

  2. #2
    Join Date
    Feb 2004
    Posts
    88
    select <column>
    from <table>
    where RTRIM(<column>, '0123456789') IS NULL

  3. #3
    Join Date
    Jan 2004
    Location
    India
    Posts
    191
    Thanks a lot . It works
    Pagnint
    (No need to search web before posting new question)

  4. #4
    Join Date
    Dec 2003
    Location
    Karachi, Pakistan
    Posts
    45

    Thumbs up Check this

    select Translate('12b23c','ABCDEFGHIJLKMNOPQRSTUVWXYZabcd efghijlkmnopqrstuvwxyz',' ') from dual

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •