Beemermonkey
Registered User.
- Local time
- , 18:04
- Joined
- Nov 2, 2006
- Messages
- 11
First off, please be gentle with me, I am a total noob on Access/SQL/etc....
Here's what I'm trying to do.
let's say I have one table with data like this
Class range
Class ValLow ValHigh
----- ---- ----
Class1 0 50
Class2 51 65
Class3 66 77
Class4 78 90
etc.
Data to classify
Entry Val
----- ----
A 10
B 26
C 52
D 85
etc.
I want a query that returns:
Entry Class
----- -----
A Class1
B Class1
C Class2
D Class4
Now I suppose this could be done with an expression with a lot of IIF's, but there are potentially THOUSANDS of classes/ranges in my real data.
I doesn't seem that Access has the concept of a CASE statement, and even if it did, it would be a huge CASE statement.
In Excel this would be trivial using a temporary column and a Vlookup, but I have hundreds of thousands of records.
How can I create a query that will do this classification? I don't even know enough about how to do it to figure out what to google on...
Here's what I'm trying to do.
let's say I have one table with data like this
Class range
Class ValLow ValHigh
----- ---- ----
Class1 0 50
Class2 51 65
Class3 66 77
Class4 78 90
etc.
Data to classify
Entry Val
----- ----
A 10
B 26
C 52
D 85
etc.
I want a query that returns:
Entry Class
----- -----
A Class1
B Class1
C Class2
D Class4
Now I suppose this could be done with an expression with a lot of IIF's, but there are potentially THOUSANDS of classes/ranges in my real data.
I doesn't seem that Access has the concept of a CASE statement, and even if it did, it would be a huge CASE statement.
In Excel this would be trivial using a temporary column and a Vlookup, but I have hundreds of thousands of records.
How can I create a query that will do this classification? I don't even know enough about how to do it to figure out what to google on...
