1
Answer

SQL Query for taking about values thru column comparison

kedar pawgi

kedar pawgi

10y
876
1
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.

 






Answers (1)