Checking valid value format

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • colintis
    Contributor
    • Mar 2010
    • 255

    Checking valid value format

    In regarding to the solution from this question through SQL query. The result I obtained contains values in other formats I don't want.

    The format of the values is length between 3 and 4 characters. The first and last character of the value are alphabets, and the middle ones is/are numerics. E.g. A1A, A12A

    In the result I'm getting in the previous solution, there are also some other values such as BACK0, LOAD3, etc.

    How can I filter out unwanted results in the query? Many thanks with all suggestions.
  • colintis
    Contributor
    • Mar 2010
    • 255

    #2
    I think I have eliminate the problem.

    Simply add additional line in the query
    Code:
    IsNumeric(Mid(Locn,2,1))
    As the standard formatting, the 2nd character must be a number after an alphabet character. Therefore it can be solve simply checking if that part of the value is numeric.

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32662

      #3
      You have more than eliminated the problem. You've solved it - with a good solution.

      Comment

      Working...