After a slight mid-week diversion, here is another script I produced a while ago which updates the Item’s Default Purchasing Unit of Measure. It was produced when a client wanted to bulk update a large number of records which would have taken a long time manually but by script only minutes to write and run.
In Microsoft Dynamics GP, the Default Purchasing Unit of Measure is maintained in the Item Purchasing Options window () along with the Purchasing Options (IV00106) but the Default Purchasing Unit of Measure is stored on the Item Master (IV00101) table;
CREATE TABLE #UploadData
(FIELDTERMINATOR = ','
,ROWTERMINATOR = '\n')
PRCHSUOM = ['Upload Data'].PRCHSUOM
IV00101 AS ['Item Master']
#UploadData AS ['Upload Data']
ON ['Upload Data'].ITEMNMBR = ['Item Master'].ITEMNMBR
DROP TABLE #UploadData
As always before running a script make sure you have a backup of your company database and only run the script if you’re comfortable working in SQL Server Management Studio.nbsp;