Lookup (1 Viewer)

Access_Help

Registered User.
Local time
Today, 06:07
Joined
Feb 12, 2005
Messages
136
Hi,

I need a query that takes a score as an input, compares the score with the different range values and returns the level (L1, L2, L3)

I am not sure how to achieve a VLOOKUP type function.

Any advice so that I dont have to type every single value for each range.



 

Attachments

  • Capture2.JPG
    Capture2.JPG
    42.7 KB · Views: 126

theDBguy

I’m here to help
Staff member
Local time
Today, 06:07
Joined
Oct 29, 2018
Messages
21,358
You could try something like.
Code:
SELECT TOP 1 Level 
FROM TableName 
WHERE Subject=[Enter Subject] 
 AND Score<=[Enter Score]
(untested)
Hope it helps...
 

Users who are viewing this thread

Top Bottom