SQL Scripts for Microsoft Dynamics GP: Select a List of Vendors

Microsoft Dynamics GPThis 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 was created as a quick way of extracting a list of vendors from Dynamics GP.

CREATE VIEW [dbo].[uv_AZRCRV_ExtractVendors] AS
/*
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 ['PM Vendor Master File'].VENDORID AS [Vendor ID] ,['PM Vendor Master File'].VENDNAME AS [Vendor Name] ,['PM Vendor Master File'].VENDSHNM AS [Short Name] ,['PM Vendor Master File'].VNDCHKNM AS [Check Name] ,['PM Vendor Master File'].VNDCLSID AS [Class ID] ,['PM Vendor Master File'].VADDCDPR AS [Primary Address Code] ,['PM Vendor Master File'].VADCDPAD AS [Purchase Address] ,['PM Vendor Master File'].VADCDTRO AS [Remit To] ,['PM Vendor Master File'].VADCDSFR AS [Ship From] ,['PM Vendor Master File'].ACNMVNDR AS [Vendor Account] ,['PM Vendor Master File'].COMMENT1 AS [Comment 1] ,['PM Vendor Master File'].COMMENT2 AS [Comment 2] ,['PM Vendor Master File'].PYMTRMID AS [Payment Terms] ,['PM Vendor Master File'].PYMNTPRI AS [Payment Priority] ,['PM Vendor Master File'].TXRGNNUM AS [Tax Registration] ,['PM Vendor Master File'].USERDEF1 AS [User-Defined 1] ,['PM Vendor Master File'].USERDEF2 AS [User-Defined 2] ,CASE WHEN ['PM Vendor Master File'].CREDTLMT = 1 THEN 'N' WHEN ['PM Vendor Master File'].CREDTLMT = 2 THEN 'U' WHEN ['PM Vendor Master File'].CREDTLMT = 3 THEN 'A' ELSE 'N' END AS [Credit Limit Type] ,['PM Vendor Master File'].CRLMTDLR AS [Credit Limit Amount] FROM PM00200 AS ['PM Vendor Master File'] WITH (NOLOCK) --PM Vendor Master File (PM00200) GO

Click to show/hide the SQL Scripts for Microsoft Dynamics GP Series Index

What should we write about next?

Looking for support or consultancy with Microsoft Dynamics GP?

Leave a Reply

Your email address will not be published. Required fields are marked *