Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003
    Posts
    32

    Unanswered: First charactor should be number

    I want the query filter out first charactor that not be number

    Field name is PRDNO, it could be 0102B, ab234 (filter out ab234)

    select PRDNO
    FROM file.lib
    WHERE LEFT(PRDNO,1)=?

    Thanks,

    Lisa

  2. #2
    Join Date
    Feb 2008
    Location
    Japan
    Posts
    3,483
    There will be many ways.
    For example:
    WHERE LOCATE(LEFT(PRDNO,1),'0123456789') = 0

    WHERE TRANSLATE(LEFT(PRDNO,1),'*',' 0123456789') <> ''

    WHERE LEFT(PRDNO,1) NOT BETWEEN '0' AND '9'
    Last edited by tonkuma; 06-29-09 at 12:55.

  3. #3
    Join Date
    Feb 2008
    Location
    Japan
    Posts
    3,483
    Where Left(prdno,1) Not In ('0','1','2','3','4','5','6','7','8','9')

Posting Permissions

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