Kedar Pawgi

Kedar Pawgi

  • 1.6k
  • 136
  • 63.4k

SQL Query for taking about values thru column comparison

Dec 12 2013 5:43 AM
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)