Link to home
Start Free TrialLog in
Avatar of SteveB2175
SteveB2175

asked on

Would like help designing a query

I am trying to write a query that will return all the packaging materials that we need to have in stock on a given date.  Here is some background:

I can write a query that will return all the part numbers and quantities that are scheduled to be produced by a given date.

I can write a query that will call a function provided by our ERP supplier that will return all the packaging materials, and quantities for any given item.

The only way that I would know to provide a list of the total packaging requirements needed on a given date would be to run the first query and insert the items into a temp table, then create a loop that would run through each item in the temp table and call the function that returns the packaging material requirements for each item.

Ive got to believe that there is a better way to do this, can someone steer me in the right direction ??

Thanks !!
ASKER CERTIFIED SOLUTION
Avatar of dqmq
dqmq
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial