timw,
your off a bit. lett me give you and example
This is my table
ID ProductID PriceOption QTY Price
1 PID3 1 Colour print 10 2.25
2 PID3 1 Colour print 20 1.00
3 PID3 2 Colour print 10 4.25
4 PID3 2 Colour print 20 1.50
5 PID6 1 Colour print 50 1.15
6 PID6 1 Colour print 60 1.00
7 PID6 1 Colour print 100 10.75
8 PID6 2 Colour print 50 2.15
9 PID6 2 Colour print 60 0.75
10 PID6 2 Colour print 70 0.24
13 PID7 Full Colour print 50 12.46
14 PID7 Full Colour print 100 8.24
15 PID8 Large 10 123.24
16 PID8 Large 20 100.00
17 PID8 Medium 10 84.10
18 PID8 Sml 50 90.24
You will notice that products have different quantities that have different prices
the lower the quantity the higher the price
now from your code
i am going to pull the products that have a min price between the range
this is not what i want
i need
to get the products whose min(qty)'s price is between the price range
now my last code works....but the katch is that the data as to be entered in sequenceial order
thus
ID ProductID PriceOption QTY Price
1 PID3 1 Colour print 20 1.25
2 PID3 1 Colour print 10 4.00
3 PID3 2 Colour print 20 1.25
4 PID3 2 Colour print 10 4.50
would put PID3 within the range 0 and 3...which is
WRONG it should be within the "BETWEEN 3 AND 5" because 1 Colour Print 10 4.00
Hope this explains my case
