• Hello Sean. Apologies, I will try to clarify.

    I have a pencils table that describes the pencils.

    pkPencilId||PencilDescription||LENGTH

    1||Yellow, w/o erase||5”

    2||Yellow, w/eraser||5”

    3||Green, w/o eraser||6”

    Then there is a PencilLot table.

    pkLotId||flPencilId ||Created||QTY

    100||2||11/15/2007||1000

    200||1||12/21/2008||800

    300||3||4/22/2011||2000

    400||1||5/12/2011||900

    Then we have a locations table that keeps track of what lots are spread over what locations.

    pkStorageId||fkLotId||LOCATION

    5||200||Cabinet A, shelf 1

    6||200||Cabinet B, shelf 2

    7||200||Cabinet K, shelf 2

    8||100||Cabinet B, shelf 3

    9||300||Cabinet D, shelf 2

    10||300||Cabinet D, shelf 3

    So if my saleswoman Brenda wants to pull 750 pencils made in lot #300, her order might look like this:

    Sales Person: Brenda

    PencilType||LotId||Location|| Qty Requested

    3||300||Cabinet D, shelf 2||750

    3||300||Cabinet D, shelf 3 ||750

    Total for order:1,500

    But of course she did not order TWO sets of 750 pencils. These line items are split into two because of the one --> many relationship between lotId and storage locations. The order SHOULD read:

    Sales Person: Brenda

    PencilType||LotId||Location|| Qty Requested

    3||300||Cabinet D, shelf 2, Cabinet D, shelf 3||750

    Total for order750

    Further compounding the issue is that she can place more than 1 lotId on a single order. I think the example you steered me towards may be it, but I need to see if that example will work for multiple different lotIds on one order. Hope this explains a bit better.

    Thanks.