This script was created to allow a client to check combinations of account (segment 2) and category combinations to make sure all accounts with those combinations had the same posting type assigned.
/*
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).
*/
SELECT DISTINCT
GL100.ACTNUMBR_2 AS 'Cost Account'
,GL102.ACCATDSC AS 'Category'
,CASE WHEN GL100.PSTNGTYP = 0 THEN
'Balance Sheet'
ELSE
'Profit and Loss'
END AS 'Posting Type'
FROM
GL00100 AS GL100 WITH (NOLOCK) --Breakdown Account Master (GL00100)
INNER JOIN
GL00102 AS GL102 WITH (NOLOCK) --Account Category Master (GL00102)
ON GL102.ACCATNUM = GL100.ACCATNUM
Click to show/hide the SQL Scripts for Microsoft Dynamics GP Series Index
Read original post SQL Scripts for Microsoft Dynamics GP: Check Posting Type for Account (Segment 2)/Account Category Combinations at azurecurve|Ramblings of an IT Professional
*This post is locked for comments