I have a query with a Months field. I need to get the value from another table based on the value of the Months field on the main query.
Employee table has the Months field
benefits table has the MaxVacation
I need to join EmpID 161 to BenID 1 since its Months are less than 120 but also join EmpID 600 to BenID 2 since its months are greater than 120
Any suggestions on this
Thanks
Employee table has the Months field
Code:
EmpID Months
161 48
600 140
benefits table has the MaxVacation
Code:
BenID MaxCumAvail MonthsEmp
1 121.54 0
2 162.31 120
I need to join EmpID 161 to BenID 1 since its Months are less than 120 but also join EmpID 600 to BenID 2 since its months are greater than 120
Any suggestions on this
Thanks