SELECT
  RTRIM([VENDORID]) AS [vendorid],
  RTRIM([VENDNAME]) AS [vendname],
  RTRIM([VNDCHKNM]) AS [vndchknm],
  RTRIM([VENDSHNM]) AS [vendshnm],
  RTRIM([VADDCDPR]) AS [vaddcdpr],
  RTRIM([VADCDPAD]) AS [vadcdpad],
  RTRIM([VADCDSFR]) AS [vadcdsfr],
  RTRIM([VADCDTRO]) AS [vadcdtro],
  RTRIM([VNDCLSID]) AS [vndclsid],
  RTRIM([VNDCNTCT]) AS [vndcntct],
  RTRIM([ADDRESS1]) AS [address1],
  RTRIM([ADDRESS2]) AS [address2],
  RTRIM([ADDRESS3]) AS [address3],
  RTRIM([CITY]) AS [city],
  RTRIM([STATE]) AS [state],
  RTRIM([ZIPCODE]) AS [zipcode],
  RTRIM([COUNTRY]) AS [country],
  RTRIM([PHNUMBR1]) AS [phnumbr1],
  RTRIM([PHNUMBR2]) AS [phnumbr2],
  RTRIM([PHONE3]) AS [phone3],
  RTRIM([FAXNUMBR]) AS [faxnumbr],
  RTRIM([UPSZONE]) AS [upszone],
  RTRIM([SHIPMTHD]) AS [shipmthd],
  RTRIM([TAXSCHID]) AS [taxschid],
  RTRIM([ACNMVNDR]) AS [acnmvndr],
  RTRIM([TXIDNMBR]) AS [txidnmbr],
  [VENDSTTS] AS [vendstts],
  RTRIM([CURNCYID]) AS [curncyid],
  RTRIM([TXRGNNUM]) AS [txrgnnum],
  RTRIM([PARVENID]) AS [parvenid],
  [TRDDISCT] AS [trddisct],
  [TEN99TYPE] AS [ten99type],
  [TEN99BOXNUMBER] AS [ten99boxnumber],
  [MINORDER] AS [minorder],
  RTRIM([PYMTRMID]) AS [pymtrmid],
  [MINPYTYP] AS [minpytyp],
  [MINPYPCT] AS [minpypct],
  [MINPYDLR] AS [minpydlr],
  [MXIAFVND] AS [mxiafvnd],
  [MAXINDLR] AS [maxindlr],
  RTRIM([COMMENT1]) AS [comment1],
  RTRIM([COMMENT2]) AS [comment2],
  RTRIM([USERDEF1]) AS [userdef1],
  RTRIM([USERDEF2]) AS [userdef2],
  [CRLMTDLR] AS [crlmtdlr],
  RTRIM([PYMNTPRI]) AS [pymntpri],
  [KPCALHST] AS [kpcalhst],
  [KGLDSTHS] AS [kgldsths],
  [KPERHIST] AS [kperhist],
  [KPTRXHST] AS [kptrxhst],
  [HOLD] AS [hold],
  [PTCSHACF] AS [ptcshacf],
  [CREDTLMT] AS [credtlmt],
  [WRITEOFF] AS [writeoff],
  [MXWOFAMT] AS [mxwofamt],
  [SBPPSDED] AS [sbppsded],
  [PPSTAXRT] AS [ppstaxrt],
  RTRIM([DXVARNUM]) AS [dxvarnum],
  [CRTCOMDT] AS [crtcomdt],
  [CRTEXPDT] AS [crtexpdt],
  [RTOBUTKN] AS [rtobutkn],
  [XPDTOBLG] AS [xpdtoblg],
  [PRSPAYEE] AS [prspayee],
  [PMAPINDX] AS [pmapindx],
  [PMCSHIDX] AS [pmcshidx],
  [PMDAVIDX] AS [pmdavidx],
  [PMDTKIDX] AS [pmdtkidx],
  [PMFINIDX] AS [pmfinidx],
  [PMMSCHIX] AS [pmmschix],
  [PMFRTIDX] AS [pmfrtidx],
  [PMTAXIDX] AS [pmtaxidx],
  [PMWRTIDX] AS [pmwrtidx],
  [PMPRCHIX] AS [pmprchix],
  [PMRTNGIX] AS [pmrtngix],
  [PMTDSCIX] AS [pmtdscix],
  [ACPURIDX] AS [acpuridx],
  [PURPVIDX] AS [purpvidx],
  [NOTEINDX] AS [noteindx],
  RTRIM([CHEKBKID]) AS [chekbkid],
  [MODIFDT] AS [modifdt],
  [CREATDDT] AS [creatddt],
  RTRIM([RATETPID]) AS [ratetpid],
  [Revalue_Vendor] AS [revalue_vendor],
  [Post_Results_To] AS [post_results_to],
  [FREEONBOARD] AS [freeonboard],
  RTRIM([GOVCRPID]) AS [govcrpid],
  RTRIM([GOVINDID]) AS [govindid],
  [DISGRPER] AS [disgrper],
  [DUEGRPER] AS [duegrper],
  RTRIM([DOCFMTID]) AS [docfmtid],
  [TaxInvRecvd] AS [taxinvrecvd],
  [USERLANG] AS [userlang],
  [WithholdingType] AS [withholdingtype],
  [WithholdingFormType] AS [withholdingformtype],
  [WithholdingEntityType] AS [withholdingentitytype],
  [TaxFileNumMode] AS [taxfilenummode],
  [BRTHDATE] AS [brthdate],
  [LaborPmtType] AS [laborpmttype],
  RTRIM([CCode]) AS [ccode],
  RTRIM([DECLID]) AS [declid],
  [CBVAT] AS [cbvat],
  [Workflow_Approval_Status] AS [workflow_approval_status],
  [Workflow_Priority] AS [workflow_priority],
  [Workflow_Status] AS [workflow_status],
  RTRIM([VADCD1099]) AS [vadcd1099],
  [DEX_ROW_TS] AS [dex_row_ts],
  [DEX_ROW_ID] AS [dex_row_id]
FROM [GPSERVER].[CHG].[dbo].[PM00200]
