Hi I need help regarding a sql query.
I have a table named paystructure with fields as minSale, maxSale, empCategory, incentiveAmt, qtySold
When i enter quantity sold then i should get the incentiveAmt based on the minSale and maxSale and empCategory.
This can be interpreted as :--
minSale maxSale incentiveAmt
100 200 50
201 300 100
301 400 150
How can i get this value based on qtySold.
I need this urgent help
Please guide me for this query
Thanks in advance.