SELECT
  RTRIM([PYMTRMID]) AS pymtrmid,
  [DUETYPE] AS duetype,
  [DUEDTDS] AS duedtds,
  [DISCTYPE] AS disctype,
  [DISCDTDS] AS discdtds,
  [DSCLCTYP] AS dsclctyp,
  [DSCDLRAM] AS dscdlram,
  [DSCPCTAM] AS dscpctam,
  [SALPURCH] AS salpurch,
  [DISCNTCB] AS discntcb,
  [FREIGHT] AS freight,
  [MISC] AS misc,
  [TAX] AS tax,
  [NOTEINDX] AS noteindx,
  [CBUVATMD] AS cbuvatmd,
  RTRIM([LSTUSRED]) AS lstusred,
  [MODIFDT] AS modifdt,
  [CREATDDT] AS creatddt,
  [USEGRPER] AS usegrper,
  [CalculateDateFrom] AS calculatedatefrom,
  [CalculateDateFromDays] AS calculatedatefromdays,
  [DueMonth] AS duemonth,
  [DiscountMonth] AS discountmonth,
  [DEX_ROW_ID] AS dex_row_id
FROM [GPSERVER].[CHG].[dbo].[SY03300]
