P.O. Order Number

May 12, 2007 6 Replies

Hi all -



I'm wondering which table and column in the database holds the "Order No." on the purchase order?



I just received a large quantiy of Order No. from a major supplier and I'd like to use an update statement to update the item table with the order number for several hundred UPS/Itemlookup numbers.



If anyone can point me the direction of the table/column for the "order no." I'd really appreciate that.



Thanks Jerry



qHi Jerry As mentioned by Ahmed, I need to add one more thing, what if the items are not Supplierlist table. then you need to give an insert statmenet execute the below code:

INSERT into SupplierList (ItemID,SupplierID,Cost,ReorderNumber) select Item.ID As ItemID,Supplier.ID As SupplierID,Item.Cost,ExcelReorderNumber from Item,Supplier,ExcelFile Where Item.ItemLookupcode=Excel.Lookupcode AND Supplier.Code='DATUM'

in 1.. Assuming that your order numbers are in excel sheet with the Itemlookupcodes, import your excel sheet into the database in a table called ExcelSuppCodes 2.. execute the following statement:- update supplierlist set supplierlist.reordernumber=ExcelSuppCodes.OrderNumber from ExcelSuppCodes,Item where ExcelSuppCodes.ItemLookupcode=Item.ItemLookupcode and item.id=supplierlist.itemid Nashat

"Jerry" wrote:

That helps a lot, but what is: Supplier.Code='DATUM'?

Thank helps but what is DATNUM?

and Supplier.Code='DATUM'

It's the supplier code for one of the suppliers in the sample database. You should replace it with the code of the supplier you wanted to add.

Glenn Adams Tiber Creek C> >> qHi Jerry

I was able to make the update and the item table looks correct but the the number of rows update is over 4670 however the updated list only had 1723 rows.

update supplierlist set supplierlist.reordernumberÛo.Sheet1$.Reorder_Number from dbo.Sheet1$,Item where dbo.Sheet1$.UPC=Item.ItemLookupcode and item.id=supplierlist.itemid and item.supplierid

There are multiple supplierlist.itemid for some of the reorder numbers

- almost always 3 itemid's for each reoder number. I'm thinking because we have multiple suppliers for the same itemlookupcode.

What is the supplierlist.id column?

What is the supplierlist.itemid column?

Thanks Jerry

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required