DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: searching start with numeric value in name

  1. #1
    Join Date
    Jul 2001
    Posts
    59
    hi to all,

    i want to find name start with only numeric value

    how i can use like operator in single assignment not multiple
    e.g. '0-9%'

    mistry_pradip@rediffmail.com

  2. #2
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    ... WHERE SUBSTR(name,1,1) BETWEEN '0' AND '9' ....
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  3. #3
    Join Date
    Jul 2001
    Posts
    59
    thank you jmodic,

    is any other way to find first character number,
    in access it runs
    like '[0-9]%'

    it is possible in oracle

    pradip mistry

  4. #4
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Unfortunately not. You must use some kind of function on your value, either SUBSTR or TRANSLATE or something like this.

    If you don't want to apply a function to your column value in order to enable index usage, you'll have to write 10 ORs with LIKE operator, ie

    ... where name like '0%' OR name like '1%' OR....OR name like '9%' ...
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

Posting Permissions

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


Click Here to Expand Forum to Full Width