SELECT
  RTRIM([CUSTNMBR]) AS [custnmbr],
  RTRIM([CPRCSTNM]) AS [cprcstnm],
  RTRIM([TRXSORCE]) AS [trxsorce],
  [DATE1] AS [date1],
  [TIME1] AS [time1],
  [GLPOSTDT] AS [glpostdt],
  [POSTED] AS [posted],
  RTRIM([TAXDTLID]) AS [taxdtlid],
  RTRIM([APTODCNM]) AS [aptodcnm],
  [APTODCTY] AS [aptodcty],
  [APTODCDT] AS [aptodcdt],
  [ApplyToGLPostDate] AS [applytoglpostdate],
  RTRIM([CURNCYID]) AS [curncyid],
  [CURRNIDX] AS [currnidx],
  [APPTOAMT] AS [apptoamt],
  [DISTKNAM] AS [distknam],
  [DISAVTKN] AS [disavtkn],
  [WROFAMNT] AS [wrofamnt],
  [ORAPTOAM] AS [oraptoam],
  [ORDISTKN] AS [ordistkn],
  [ORDATKN] AS [ordatkn],
  [ORWROFAM] AS [orwrofam],
  [APTOEXRATE] AS [aptoexrate],
  [APTODENRATE] AS [aptodenrate],
  [APTORTCLCMETH] AS [aptortclcmeth],
  [APTOMCTRXSTT] AS [aptomctrxstt],
  RTRIM([APFRDCNM]) AS [apfrdcnm],
  [APFRDCTY] AS [apfrdcty],
  [APFRDCDT] AS [apfrdcdt],
  [ApplyFromGLPostDate] AS [applyfromglpostdate],
  RTRIM([FROMCURR]) AS [fromcurr],
  [APFRMAPLYAMT] AS [apfrmaplyamt],
  [APFRMDISCTAKEN] AS [apfrmdisctaken],
  [APFRMDISCAVAIL] AS [apfrmdiscavail],
  [APFRMWROFAMT] AS [apfrmwrofamt],
  [ActualApplyToAmount] AS [actualapplytoamount],
  [ActualDiscTakenAmount] AS [actualdisctakenamount],
  [ActualDiscAvailTaken] AS [actualdiscavailtaken],
  [ActualWriteOffAmount] AS [actualwriteoffamount],
  [APFRMEXRATE] AS [apfrmexrate],
  [APFRMDENRATE] AS [apfrmdenrate],
  [APFRMRTCLCMETH] AS [apfrmrtclcmeth],
  [APFRMMCTRXSTT] AS [apfrmmctrxstt],
  [APYFRMRNDAMT] AS [apyfrmrndamt],
  [APYTORNDAMT] AS [apytorndamt],
  [APYTORNDDISC] AS [apytornddisc],
  [OAPYFRMRNDAMT] AS [oapyfrmrndamt],
  [OAPYTORNDAMT] AS [oapytorndamt],
  [OAPYTORNDDISC] AS [oapytornddisc],
  [GSTDSAMT] AS [gstdsamt],
  [PPSAMDED] AS [ppsamded],
  [RLGANLOS] AS [rlganlos],
  [Settled_Gain_CreditCurrT] AS [settled_gain_creditcurrt],
  [Settled_Loss_CreditCurrT] AS [settled_loss_creditcurrt],
  [Settled_Gain_DebitCurrTr] AS [settled_gain_debitcurrtr],
  [Settled_Loss_DebitCurrTr] AS [settled_loss_debitcurrtr],
  [Settled_Gain_DebitDiscAv] AS [settled_gain_debitdiscav],
  [Settled_Loss_DebitDiscAv] AS [settled_loss_debitdiscav],
  [Revaluation_Status] AS [revaluation_status],
  [DEX_ROW_ID] AS [dex_row_id]
FROM [GPSERVER].[CHG].[dbo].[rm20201]
