This script is part of the SQL Scripts for Microsoft Dynamics GP where I will be posted the scripts I wrote against Microsoft Dynamics GP over the 19 years before I stopped working with Dynamics GP.
This script updates the accounts on an inventory item from the linked Item Class. The script was written after some accounts were updated and the user opted not to roll-down the changes to the items. The roll-down should have been performed and was needed, so this script was created to updsate the items.
/*
Created by Ian Grieve of azurecurve | Ramblings of an IT Professional (http://www.azurecurve.co.uk)
This code is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0 Int).
*/
UPDATE
['Inventory Item Master']
SET
IVIVINDX = ['Item Class Setup'].IVIVINDX
,IVIVOFIX = ['Item Class Setup'].IVIVOFIX
,IVCOGSIX = ['Item Class Setup'].IVCOGSIX
,IVSLSIDX = ['Item Class Setup'].IVSLSIDX
,IVSLDSIX = ['Item Class Setup'].IVSLDSIX
,IVSLRNIX = ['Item Class Setup'].IVSLRNIX
,IVINUSIX = ['Item Class Setup'].IVINUSIX
,IVINSVIX = ['Item Class Setup'].IVINSVIX
,IVDMGIDX = ['Item Class Setup'].IVDMGIDX
,IVVARIDX = ['Item Class Setup'].IVVARIDX
,DPSHPIDX = ['Item Class Setup'].DPSHPIDX
,PURPVIDX = ['Item Class Setup'].PURPVIDX
,UPPVIDX = ['Item Class Setup'].UPPVIDX
,IVRETIDX = ['Item Class Setup'].IVRETIDX
,ASMVRIDX = ['Item Class Setup'].ASMVRIDX
,IVSCRVIX = ['Item Class Setup'].IVSCRVIX
FROM
IV00101 AS ['Inventory Item Master']
INNER JOIN
IV40400 AS ['Item Class Setup']
ON
['Item Class Setup'].ITMCLSCD = ['Inventory Item Master'].ITMCLSCD
GO