Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004

    Unanswered: Query to only search for Integers

    I have a query that is looking at a specific field. Unfortunately, the field is a text field, so on occasion, the data entry includes a letter but when it does, that data is irrelevant to the eventual output that my query is looking for.

    How can I modify my existing query to check this field, and if it contains a letter in any position to immediately ignore it as being included in the output, therefore allowing me to avoid having Data Type Mismatches....

    Thanks for the help in advance.

    First time post, long time lurker..... Rex

  2. #2
    Join Date
    Feb 2004
    Houston, Texas
    Would something like this work for you?

    SELECT Tbl.ID_NO, IIf(IsNumeric([ID_NO]),1,0) AS CHeckValue
    FROM Tbl
    WHERE IIf(IsNumeric([ID_NO]),1,0)=1


Posting Permissions

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