Quantcast
Channel: WinDev Forum
Viewing all articles
Browse latest Browse all 1914

How to retrive values based on Slabs (2 replies)

$
0
0
Hello,

I have a table whose structure is:
p_product_id
p_weight
p_rate

This table contains following data:
p_product_id   p_weight      p_rate
1                       0.250            1
1                       0.500            4
1                       0.750            7
1                       0.900            7.5
1                       1.000            10
2                       0.250            2
2                       0.500            3
2                       1.150            10.5
3                       0.700            6.5
3                       0.900            7.5


Now when a user enters Weight I need to find the rate applicable.

So if user enters weight of 0.600 then based on the product selected the rate applicable is that of 0.750 that is 7

What query should I use for retrieving this rate?

TIA

Viewing all articles
Browse latest Browse all 1914

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>