I have two tables, Table A with the hours, and Table B to have Grade, and minimum Hour required
What I’m trying to do is to assign TableB.Grade to TableA depending on how much hours each record has.
Example:
TableA
Name Hours
Person A 205
Person B 105
Person C 400
Table B
Grade HoursRequired
1 0
2 100
3 200
4 300
My expected report
Name Hours Grade
Person A 105 2
Person B 205 3
Person C 400 4
Any advise on the SQL coding or restructuring of table would be appreciated.
I like @Andomar’s suggestion. However, if subqueries confuse you, you could revise TableB like this:
Then use this query:
Name is a reserved word so I re-named your Name field to person_name.