SELECT
  RTRIM(V6PART) AS v6part,
  RTRIM(V6PLNT) AS v6plnt,
  RTRIM(V6UNTI) AS v6unti,
  RTRIM(V6RPLN) AS v6rpln,
  RTRIM(V6TPLN) AS v6tpln,
  V6TDYS AS v6tdys,
  V6MRPS AS v6mrps,
  RTRIM(V6ABCC) AS v6abcc,
  V6CCPY AS v6ccpy,
  CASE WHEN V6LCDT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE V6LCDT END AS v6lcdt,
  CASE WHEN V6DBCC IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE V6DBCC END AS v6dbcc,
  V6ORDQ AS v6ordq,
  RTRIM(V6OPCY) AS v6opcy,
  V6MULT AS v6mult,
  RTRIM(V6FUT1) AS v6fut1,
  RTRIM(V6FUT2) AS v6fut2,
  RTRIM(V6SCDT) AS v6scdt,
  RTRIM(V6PLAN) AS v6plan,
  RTRIM(V6CNTR) AS v6cntr,
  RTRIM(V6UNTP) AS v6untp,
  V6LVL AS v6lvl,
  V6PACK AS v6pack,
  RTRIM(V6PACU) AS v6pacu,
  V6PRPT AS v6prpt,
  RTRIM(V6KITC) AS v6kitc,
  RTRIM(V6PROC) AS v6proc,
  RTRIM(V6LRSP) AS v6lrsp,
  V6LRSC AS v6lrsc,
  RTRIM(V6LRSF) AS v6lrsf,
  RTRIM(V6LRMP) AS v6lrmp,
  V6LRMC AS v6lrmc,
  RTRIM(V6LRMF) AS v6lrmf,
  RTRIM(V6LWSP) AS v6lwsp,
  V6LWSC AS v6lwsc,
  RTRIM(V6LWSF) AS v6lwsf,
  RTRIM(V6LCSP) AS v6lcsp,
  V6LCSC AS v6lcsc,
  RTRIM(V6LCSF) AS v6lcsf,
  RTRIM(V6LCMP) AS v6lcmp,
  V6LCMC AS v6lcmc,
  RTRIM(V6LCMF) AS v6lcmf,
  V6LSSC AS v6lssc,
  RTRIM(V6LSSF) AS v6lssf,
  RTRIM(V6LSMP) AS v6lsmp,
  V6LSMC AS v6lsmc,
  RTRIM(V6LSMF) AS v6lsmf,
  V6MPCK AS v6mpck,
  RTRIM(V6MPKU) AS v6mpku,
  V6ALTF AS v6altf,
  RTRIM(V6DBUY) AS v6dbuy,
  V6SCDP AS v6scdp,
  RTRIM(V6SELP) AS v6selp,
  V6RCPS AS v6rcps,
  RTRIM(V6RECU) AS v6recu,
  RTRIM(V6RECC) AS v6recc,
  V6FTMF AS v6ftmf,
  RTRIM(V6CSMU) AS v6csmu,
  RTRIM(V6NTKY) AS v6ntky,
  V6MINQ AS v6minq,
  V6MAXQ AS v6maxq,
  V6MOQT AS v6moqt,
  V6ESTV AS v6estv,
  RTRIM(V6CORG) AS v6corg,
  RTRIM(V6PSOR) AS v6psor,
  RTRIM(V6STAT) AS v6stat,
  RTRIM(V6REAS) AS v6reas,
  RTRIM(V6AUTY) AS v6auty,
  RTRIM(V6UNTO) AS v6unto,
  RTRIM(V6REQC) AS v6reqc,
  RTRIM(V6BUYR) AS v6buyr,
  V6LEAD AS v6lead,
  V6OPTR AS v6optr,
  V6MULTP AS v6multp,
  V6MINR AS v6minr,
  V6PERC AS v6perc,
  V6OLA AS v6ola,
  V6MPQT AS v6mpqt,
  V6DPST AS v6dpst,
  CASE WHEN V6SPDT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE V6SPDT END AS v6spdt,
  CASE WHEN V6BBDT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE V6BBDT END AS v6bbdt,
  V6ORLT AS v6orlt,
  RTRIM(V6AUTR) AS v6autr,
  RTRIM(V6REPP) AS v6repp,
  V6REPT AS v6rept,
  V6SHRK AS v6shrk,
  V6FCFN AS v6fcfn,
  V6AUTO AS v6auto,
  V6OLOK AS v6olok,
  RTRIM(V6OEPY) AS v6oepy,
  RTRIM(V6PRFR) AS v6prfr,
  RTRIM(V6CMTL) AS v6cmtl,
  RTRIM(V6DRWS) AS v6drws,
  RTRIM(V6DRWL) AS v6drwl,
  RTRIM(V6DENC) AS v6denc,
  RTRIM(V6DREL) AS v6drel,
  CASE WHEN V6DDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE V6DDAT END AS v6ddat,
  RTRIM(V6DRWN) AS v6drwn,
  RTRIM(V6DRWS2) AS v6drws2,
  RTRIM(V6DRWL2) AS v6drwl2,
  RTRIM(V6DENC2) AS v6denc2,
  RTRIM(V6DREL2) AS v6drel2,
  CASE WHEN V6DDAT2 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE V6DDAT2 END AS v6ddat2,
  RTRIM(V6DRWN2) AS v6drwn2,
  RTRIM(V6LOTF) AS v6lotf,
  RTRIM(V6SERF) AS v6serf,
  RTRIM(V6LOTB) AS v6lotb,
  RTRIM(V6LOTA) AS v6lota,
  RTRIM(V6LOTV) AS v6lotv,
  RTRIM(V6STCL) AS v6stcl,
  RTRIM(V6VLCD) AS v6vlcd,
  V6SPPP AS v6sppp,
  RTRIM(V6SPPC) AS v6sppc,
  V6MPPP AS v6mppp,
  RTRIM(V6MPPC) AS v6mppc,
  RTRIM(V6FRML) AS v6frml,
  RTRIM(V6ISTR) AS v6istr,
  RTRIM(V6ENGC) AS v6engc,
  RTRIM(V6REVL) AS v6revl,
  CASE WHEN V6RDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE V6RDAT END AS v6rdat,
  RTRIM(V6RCVLC) AS v6rcvlc,
  RTRIM(V6SFLC) AS v6sflc,
  RTRIM(V6CUSR) AS v6cusr,
  CASE WHEN V6CDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE V6CDAT END AS v6cdat,
  V6CTME AS v6ctme,
  RTRIM(V6UUSR) AS v6uusr,
  CASE WHEN V6UDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE V6UDAT END AS v6udat,
  V6UTME AS v6utme,
  RTRIM(V6FUT3) AS v6fut3,
  RTRIM(V6FUT4) AS v6fut4,
  RTRIM(V6FUT5) AS v6fut5,
  RTRIM(V6FLG1) AS v6flg1,
  RTRIM(V6FLG2) AS v6flg2,
  RTRIM(V6FLG3) AS v6flg3,
  RTRIM(V6FLG4) AS v6flg4,
  RTRIM(V6FLG5) AS v6flg5,
  RTRIM(V6FLG6) AS v6flg6,
  RTRIM(V6FLG7) AS v6flg7,
  RTRIM(V6FLG8) AS v6flg8,
  RTRIM(V6FLG9) AS v6flg9,
  RTRIM(V6FLG10) AS v6flg10,
  V6FUT6 AS v6fut6,
  RTRIM(V6FUT7) AS v6fut7,
  RTRIM(V6FUT8) AS v6fut8,
  RTRIM(V6FUT9) AS v6fut9,
  RTRIM(V6FUT10) AS v6fut10,
  RTRIM(V6FUT11) AS v6fut11,
  RTRIM(V6FUT12) AS v6fut12,
  RTRIM(V6FUT13) AS v6fut13,
  RTRIM(V6FUT14) AS v6fut14,
  RTRIM(V6FUT15) AS v6fut15,
  RTRIM(V6FUT16) AS v6fut16,
  RTRIM(V6FUT17) AS v6fut17,
  RTRIM(V6FUT18) AS v6fut18,
  RTRIM(V6FUT19) AS v6fut19,
  RTRIM(V6FUT20) AS v6fut20,
  RTRIM(V6FUT21) AS v6fut21,
  RTRIM(V6FUT22) AS v6fut22,
  RTRIM(V6FUT23) AS v6fut23,
  RTRIM(V6FUT24) AS v6fut24,
  RTRIM(V6FUT25) AS v6fut25,
  V6FUT26 AS v6fut26,
  V6FUT27 AS v6fut27,
  V6FUT28 AS v6fut28,
  V6FUT29 AS v6fut29,
  V6FUT30 AS v6fut30,
  V6FUT31 AS v6fut31,
  V6FUT32 AS v6fut32,
  V6FUT33 AS v6fut33,
  V6FUT34 AS v6fut34,
  V6FUT35 AS v6fut35,
  CASE WHEN V6FUT36 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE V6FUT36 END AS v6fut36,
  CASE WHEN V6FUT37 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE V6FUT37 END AS v6fut37,
  CASE WHEN V6FUT38 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE V6FUT38 END AS v6fut38,
  CASE WHEN V6FUT39 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE V6FUT39 END AS v6fut39,
  CASE WHEN V6FUT40 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE V6FUT40 END AS v6fut40,
  V6FUT41 AS v6fut41,
  V6FUT42 AS v6fut42,
  V6FUT43 AS v6fut43,
  V6FUT44 AS v6fut44,
  V6FUT45 AS v6fut45,
  RTRIM(V6PRCL) AS v6prcl,
  RTRIM(V6DBAC) AS v6dbac,
  RTRIM(V6SCDPT) AS v6scdpt,
  RTRIM(V6APSUP) AS v6apsup,
  RTRIM(V6MATP) AS v6matp,
  RTRIM(V6MATM) AS v6matm,
  RTRIM(V6MESC) AS v6mesc,
  RTRIM(V6CRTM) AS v6crtm,
  V6LLED AS v6lled,
  RTRIM(V6PCTR) AS v6pctr,
  RTRIM(V6INQU) AS v6inqu,
  RTRIM(V6CLEXP) AS v6clexp,
  RTRIM(V6ATPDRP) AS v6atpdrp,
  RTRIM(V6CPJGL) AS v6cpjgl,
  RTRIM(V6SHLOTM) AS v6shlotm,
  RTRIM(V6WTYSHP) AS v6wtyshp,
  RTRIM(V6BSLTM) AS v6bsltm,
  RTRIM(V6RQORDI) AS v6rqordi,
  RTRIM(V6MBUNT) AS v6mbunt,
  RTRIM(V6RQRVQC) AS v6rqrvqc,
  RTRIM(V6IEEDTC) AS v6ieedtc,
  RTRIM(V6UTDAY) AS v6utday,
  RTRIM(V6INSTKR) AS v6instkr,
  RTRIM(V6ATSPK) AS v6atspk,
  RTRIM(V6CCPTCP) AS v6ccptcp,
  RTRIM(V6CALMB) AS v6calmb,
  RTRIM(V6MBCALM) AS v6mbcalm,
  RTRIM(V6CALITV) AS v6calitv,
  V6PCTNCN AS v6pctncn,
  V6PDPMLT AS v6pdpmlt,
  V6SHPMLT AS v6shpmlt,
  V6TOLD AS v6told,
  V6NITV AS v6nitv,
  V6LNITV AS v6lnitv,
  V6MINDV AS v6mindv,
  RTRIM(V6HJPP) AS v6hjpp,
  RTRIM(V6USHJ) AS v6ushj,
  RTRIM(V6USHP) AS v6ushp,
  RTRIM(V6FUT46) AS v6fut46,
  RTRIM(V6FUT47) AS v6fut47,
  RTRIM(V6FUT48) AS v6fut48,
  RTRIM(V6FUT49) AS v6fut49,
  RTRIM(V6FUT50) AS v6fut50,
  RTRIM(V6FUT51) AS v6fut51,
  RTRIM(V6FUT52) AS v6fut52,
  RTRIM(V6FUT53) AS v6fut53,
  V6FUT54 AS v6fut54,
  V6FUT55 AS v6fut55
FROM LGDAT.STKA
