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 manufacturing cost accounts on the items using the accounts on the linked classes; this script was created for a client where it was found that classes had been updated and the items still had the wrong codes.
/*
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
[IC COST Item Master']
SET
ICIVCLIXI = ['IC COST Item Class Setup'].ICIVCLIXI
,ICIVCLABOHIXI = ['IC COST Item Class Setup'].ICIVCLABOHIXI
,ICIVCOGSLABOHVARIX_I = ['IC COST Item Class Setup'].ICIVCOGSLABOHVARIX_I
,ICIVCCIXI = ['IC COST Item Class Setup'].ICIVCCIXI
,ICIVCMACHOHIXI = ['IC COST Item Class Setup'].ICIVCMACHOHIXI
,ICIVCOGSMACHOHVARIX_I = ['IC COST Item Class Setup'].ICIVCOGSMACHOHVARIX_I
,ICIVCMIXI = ['IC COST Item Class Setup'].ICIVCMIXI
,ICIVCMATOHIXI = ['IC COST Item Class Setup'].ICIVCMATOHIXI
,ICIVCOGSMATOHVARIX_I = ['IC COST Item Class Setup'].ICIVCOGSMATOHVARIX_I
,ICIVCOIXI = ['IC COST Item Class Setup'].ICIVCOIXI
,ICIVMFIXI = ['IC COST Item Class Setup'].ICIVMFIXI
,ICIVMUIXI = ['IC COST Item Class Setup'].ICIVMUIXI
,ICIVMATUSAGEVAROHIX_I = ['IC COST Item Class Setup'].ICIVMATUSAGEVAROHIX_I
,ICIVMATUSAGEVAROHVARIX_I = ['IC COST Item Class Setup'].ICIVMATUSAGEVAROHVARIX_I
,ICIVMVIXI = ['IC COST Item Class Setup'].ICIVMVIXI
,ICIVPVIXI = ['IC COST Item Class Setup'].ICIVPVIXI
,ICIVROIXI = ['IC COST Item Class Setup'].ICIVROIXI
,ICIVSCIXI = ['IC COST Item Class Setup'].ICIVSCIXI
,ICIVLVIXI = ['IC COST Item Class Setup'].ICIVLVIXI
,ICIVUPPV_I = ['IC COST Item Class Setup'].ICIVUPPV_I
,ICIVLABVAROHIX_I = ['IC COST Item Class Setup'].ICIVLABVAROHIX_I
,ICIVLABVAROHVARIX_I = ['IC COST Item Class Setup'].ICIVLABVAROHVARIX_I
,ICIVMEVIXI = ['IC COST Item Class Setup'].ICIVMEVIXI
,ICIVMACHEFFVAROHIX_I = ['IC COST Item Class Setup'].ICIVMACHEFFVAROHIX_I
,ICIVMACHEFFVAROHVARIX_I = ['IC COST Item Class Setup'].ICIVMACHEFFVAROHVARIX_I
,ICIVOVIXI = ['IC COST Item Class Setup'].ICIVOVIXI
,ICIVWLIXI = ['IC COST Item Class Setup'].ICIVWLIXI
,ICIVWLOHIXI = ['IC COST Item Class Setup'].ICIVWLOHIXI
,ICIVWIPLABOHVARIX_I = ['IC COST Item Class Setup'].ICIVWIPLABOHVARIX_I
,ICIVWCIXI = ['IC COST Item Class Setup'].ICIVWCIXI
,ICIVWMACHOHIXI = ['IC COST Item Class Setup'].ICIVWMACHOHIXI
,ICIVWIPMACHOHVARIX_I = ['IC COST Item Class Setup'].ICIVWIPMACHOHVARIX_I
,ICIVWMIXI = ['IC COST Item Class Setup'].ICIVWMIXI
,ICIVWMATOHIXI = ['IC COST Item Class Setup'].ICIVWMATOHIXI
,ICIVWIPMATOHVARIX_I = ['IC COST Item Class Setup'].ICIVWIPMATOHVARIX_I
,ICIVWOIXI = ['IC COST Item Class Setup'].ICIVWOIXI
,ICIVILIXI = ['IC COST Item Class Setup'].ICIVILIXI
,ICIVILABOHIXI = ['IC COST Item Class Setup'].ICIVILABOHIXI
,ICIVINVLABOHVARIX_I = ['IC COST Item Class Setup'].ICIVINVLABOHVARIX_I
,ICIVIMXI = ['IC COST Item Class Setup'].ICIVIMXI
,ICIVIMACHOHIXI = ['IC COST Item Class Setup'].ICIVIMACHOHIXI
,ICIVINVMACHOHVARIX_I = ['IC COST Item Class Setup'].ICIVINVMACHOHVARIX_I
,ICIVIMATOHIXI = ['IC COST Item Class Setup'].ICIVIMATOHIXI
,ICIVINVMATOHVARIX_I = ['IC COST Item Class Setup'].ICIVINVMATOHVARIX_I
FROM
CT00102 AS [IC COST Item Master'] --CT00102
INNER JOIN
CT40401 AS ['IC COST Item Class Setup'] --CT40401
ON
['IC COST Item Class Setup'].ITMCLSCD = [IC COST Item Master'].ITMCLSCD
GO
Click to show/hide the SQL Scripts for Microsoft Dynamics GP Series Index
What should we write about next?
If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.
Looking for support or consultancy with Microsoft Dynamics GP?
I no longer work with Microsoft Dynamics GP, but the last company I worked for was ISC Software in the UK; if you’re looking for support or consultancy services with Microsoft Dynamics GP you can contact them here.