M
mjrob
Guest
I have the following 2 tables linked by PartIndex which is unique in the Item table.
Item:
ItemNo
ItemDesc
PartIndex
Pricing:
MinQty
MaxQty
Price
PartIndex
The pricing table contains multiple pricing records for each item depending on the MinQty and MaxQty. Not all items have the same Min and Max qtys available and some have only one.
MinQty MaxQty Price PartIndex
1 10 10 1001
11 24 7 1001
25 50 5 1001
50 100 3 1001
25 50 14 1002
I am trying to write a MakeTable query to extract all of the data from the record with the lowest MinQty and discard the rest. Since the MinQty is not the same on all the items I cannot use MinQty=1 in my query.
Is there a way to get ItemNo, ItemDesc, PartIndex, MinQty, MaxQty, Price, and PartIndex for an Item record containing pricing from the lowest MinQty only?
Note: not using VB / SQL code, making it right from the query design view. Can do some limited SQL if
it's needed to make this work.
Thanks in advance!
John
Item:
ItemNo
ItemDesc
PartIndex
Pricing:
MinQty
MaxQty
Price
PartIndex
The pricing table contains multiple pricing records for each item depending on the MinQty and MaxQty. Not all items have the same Min and Max qtys available and some have only one.
MinQty MaxQty Price PartIndex
1 10 10 1001
11 24 7 1001
25 50 5 1001
50 100 3 1001
25 50 14 1002
I am trying to write a MakeTable query to extract all of the data from the record with the lowest MinQty and discard the rest. Since the MinQty is not the same on all the items I cannot use MinQty=1 in my query.
Is there a way to get ItemNo, ItemDesc, PartIndex, MinQty, MaxQty, Price, and PartIndex for an Item record containing pricing from the lowest MinQty only?
Note: not using VB / SQL code, making it right from the query design view. Can do some limited SQL if
it's needed to make this work.
Thanks in advance!
John