stevebanks
Programmer
- Mar 30, 2004
- 93
Hey people,
Having a little problem. I have two tables, stock and reorder. The stock table has just one entry for each item of stock with an amount, amountbackordered, and amountcommitted. The reorder table has multiple entries for the same items - different (past and present) order dates, and in some cases 3 ordered quantities for delivery on the same date i.e 4 + 6 + 8 but 3 entries for it... I need to be able to get the delivery number on order and its expected delivery date, per item of stock.
I am struggling. I did have
but that's giving me multiple records per stock item where i only want the one (and if requiring a delivery showing how many are being delivered and when)
this is our company system that I am logging into via ODBC so I cannot alter anything from the tables unfortunately...
Please help!!! thank you
Having a little problem. I have two tables, stock and reorder. The stock table has just one entry for each item of stock with an amount, amountbackordered, and amountcommitted. The reorder table has multiple entries for the same items - different (past and present) order dates, and in some cases 3 ordered quantities for delivery on the same date i.e 4 + 6 + 8 but 3 entries for it... I need to be able to get the delivery number on order and its expected delivery date, per item of stock.
I am struggling. I did have
Code:
SELECT stock.number, stock.units, stock.bounits, stock.commited, reorder.number, reorder.quantity, reorder.expect_on
FROM puritem RIGHT JOIN stock ON reorder.number = stock.number;
but that's giving me multiple records per stock item where i only want the one (and if requiring a delivery showing how many are being delivered and when)
this is our company system that I am logging into via ODBC so I cannot alter anything from the tables unfortunately...
Please help!!! thank you