469,315 Members | 1,572 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,315 developers. It's quick & easy.

looping in query

morning all,

let me just go straight to the problem:
I have Table "Product list" as below;
ID Prod No Price
1 ABC-123 6.1
2 ABD-345 6.2
3 AHD-352 6.2
4 AHF-135 6.3
5 AYU-633 6.5
6 AIK-543 6.5
7 ARE-565 6.8
8 AKI-902 7.1
9 AWQ-922 7.1
10 ATR-677 7.3

And there is a form prompting a "Total Production" as well as
"Fluctuation", i.e: total Production:10000 and fluctuation:10%, thus
the Production range should be 9000 to 11000.

Now come this term call "Qty break" which is the quantity for whole
range of product base on above production range.
Rules are:
1.(The lowest price in "Product list"table)*(Qty Break) > (Lower
Production range)
2.(the Highest price in "Product list"table)*(Qty Break) < (Higher
Production range)

But there are also some criteria for Qty Break whereby (if possible)
it should ends with more "0" value

Example as above;
Lower part--> 9000/6.1=1475.4
Higher part -->11000/7.3=1506.8

So possible value for qty Break are: 1480,1490 and 1500 (three values
satisfied rule 1 and 2) so in this case program will choose 1500 since
it has more 0's

Anyone know how to this working?

Regards,
rio
Nov 13 '05 #1
0 1103

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by kaptain kernel | last post: by
2 posts views Thread by ensnare | last post: by
reply views Thread by Comcast News | last post: by
5 posts views Thread by Bruce Lawrence | last post: by
20 posts views Thread by Stewart Graefner | last post: by
2 posts views Thread by Delores | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.