I'm new to MS Access SQL and I'm trying to compare data to a table of multiple ranges in order to return yes/no results. I.e.: If this number is between X and Y, do this, else do this. My problem is that there are multiple ranges to be examined. These ranges are stored in a table (let's call it Range), and are all 3-digit numbers:
I'm trying to check if my number exists between any of these ranges in order to exclude them from further analysis. Here's what I'm trying, that isn't working:
Once I have the range check, I want to embed two other IIF statements in it, effectively excluding numbers that fall in range from further analysis.
I'm doing it this way because I'm doing a series of these types of checks in order to return a table showing results for five or six different checks.
Is this just a matter of proper syntax for doing between and select?
Code:
Low High 007 015 058 077 500 599 750 799
Code:
IIF([Number] BETWEEN (select Low from Range) AND (select High from Range),"","analyze this record") AS NumberCheck,
I'm doing it this way because I'm doing a series of these types of checks in order to return a table showing results for five or six different checks.
Is this just a matter of proper syntax for doing between and select?
Comment