I need to join tables, but the key must be different depending on the conditions Exemple Given each type and salary the following fee must be charged Table 1 Type salary FEE(%) A 1000 1 A 2000 2 A 3000 2,5 B 1000 2 B 2000 3 C 2000 1 Table 2 cliente type salary 1 A 1500 2 B 1600 3 A 1000 4 B 3500 5 C 8000 6 C 2000 My Key is type and salary, but the fee the fee must be charged according to the previous range Exemple cliente 1 must pay 1 % because the salary is smaller then the second type 2000. how can I create the condition of the key considering the range?
I tried "if - then ", but I have many conditions (more than 1000, it would be unfeasible)
... View more