I have to build a query to calculate bag weight. I am calling this complex from my perspective
The bag weight has 2 major components
How do I build a query to select the yarn weight?
There is a combo box say cboSew to select the type of Sewing SewA, SewB and SewC,
The argument needs to first read the width of the bag from a Table called CustInput where the user selects this width and length, select the width range it qualifies in WidthA, WidthB or WidthC, and based on this range and the cboSew value, return the weight of the yarn
The weight of the yarn+fabric weight gives the weight of the bag
The bag weight has 2 major components
- Fabric – the weight of this is easy to calculate. It is related to width of the bag and length
- The yarn used sew the bottom of the bag. This yarn weight depends on different types to stitching on top of the bag – say SewA, SewB and SewC as well as the width of the bag which say is 3 categories – WidthA, WidthB and WidthC. So there are 9 possible values of yarn weight 3 x 3 matrix. These 9 values are stored in a Table with rows as below
- Fields are Sew, WidthA,WidthB and WidthC and value of Sew are SewA, SewB and SewC
WidthA | WidthB | WidthC | |
SewA | 0.5 | 0.8 | 1.1 |
SewB | 0.6 | 0.8 | 1.0 |
SewC | 0.3 | 0.6 | 0.9 |
- The WidthA, WidthB and WidthC are ranges of the actual Width of the bag (Width of the bag in a numeric field called Width) e.g if Width is between 10 and 13, the range is WidthA, between 13 to 15 is WidthB and between 15 to 18 is WidthC
How do I build a query to select the yarn weight?
There is a combo box say cboSew to select the type of Sewing SewA, SewB and SewC,
The argument needs to first read the width of the bag from a Table called CustInput where the user selects this width and length, select the width range it qualifies in WidthA, WidthB or WidthC, and based on this range and the cboSew value, return the weight of the yarn
The weight of the yarn+fabric weight gives the weight of the bag