SELECT
  RTRIM(YAPLNT) AS yaplnt,
  RTRIM(YAPNME) AS yapnme,
  "YAADR#" AS "yaadr#",
  RTRIM(YASLOC) AS yasloc,
  RTRIM(YARLOC) AS yarloc,
  RTRIM(YATLOC) AS yatloc,
  RTRIM(YATMZN) AS yatmzn,
  YAMRPS AS yamrps,
  YAMTHC AS yamthc,
  RTRIM(YASLSF) AS yaslsf,
  RTRIM(YACUSR) AS yacusr,
  CASE WHEN YACDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE YACDAT END AS yacdat,
  YACTME AS yactme,
  RTRIM(YAUUSR) AS yauusr,
  CASE WHEN YAUDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE YAUDAT END AS yaudat,
  YAUTME AS yautme,
  RTRIM(YAFUT1) AS yafut1,
  RTRIM(YAFUT2) AS yafut2,
  RTRIM(YAFUT3) AS yafut3,
  RTRIM(YAFUT4) AS yafut4,
  RTRIM(YAWIPF) AS yawipf,
  RTRIM(YAWIPT) AS yawipt,
  RTRIM(YASCPF) AS yascpf,
  RTRIM(YAFUT5) AS yafut5,
  YACOMP AS yacomp,
  YAACRL AS yaacrl,
  RTRIM(YAFUT6) AS yafut6,
  RTRIM(YAFUT7) AS yafut7,
  RTRIM(YAFUT8) AS yafut8,
  YAFUT9 AS yafut9,
  RTRIM(YAFLG1) AS yaflg1,
  RTRIM(YAFLG2) AS yaflg2,
  RTRIM(YAFLG3) AS yaflg3,
  RTRIM(YAFLG4) AS yaflg4,
  RTRIM(YAFLG5) AS yaflg5,
  RTRIM(YAPRCV) AS yaprcv,
  RTRIM(YAPRTN) AS yaprtn,
  RTRIM(YACONT) AS yacont,
  RTRIM(YAFUT10) AS yafut10,
  RTRIM(YAFUT11) AS yafut11,
  RTRIM(YAFUT12) AS yafut12,
  RTRIM(YAFUT13) AS yafut13,
  RTRIM(YAFUT14) AS yafut14,
  RTRIM(YAMDFL) AS yamdfl,
  RTRIM(YACCSL) AS yaccsl,
  RTRIM(YAVCSL) AS yavcsl,
  RTRIM(YAOSSL) AS yaossl,
  RTRIM(YATMZC) AS yatmzc,
  RTRIM(YARTSI) AS yartsi,
  RTRIM(YAWSFSL) AS yawsfsl,
  RTRIM(YAEMAL) AS yaemal,
  YAFACRL AS yafacrl,
  RTRIM(YASCDL) AS yascdl,
  RTRIM(YASCPLT) AS yascplt,
  YAPCKLT AS yapcklt,
  RTRIM(YASTER) AS yaster,
  RTRIM(YARPRL) AS yarprl,
  RTRIM(YARSLC) AS yarslc,
  RTRIM(YAHIN) AS yahin,
  RTRIM(YADPVT) AS yadpvt,
  RTRIM(YARSVT) AS yarsvt,
  RTRIM(YAAPSB) AS yaapsb,
  RTRIM(YAITBL) AS yaitbl,
  RTRIM(YASPLT) AS yasplt,
  RTRIM(YAFUT15) AS yafut15,
  RTRIM(YAFUT16) AS yafut16,
  RTRIM(YAFUT17) AS yafut17,
  RTRIM(YAFUT18) AS yafut18,
  YAFUT19 AS yafut19,
  YAFUT20 AS yafut20,
  RTRIM(YAFUT21) AS yafut21,
  RTRIM(YAFUT22) AS yafut22,
  RTRIM(YAFUT23) AS yafut23,
  RTRIM(YAFUT24) AS yafut24,
  RTRIM(YAFUT25) AS yafut25,
  RTRIM(YAFUT26) AS yafut26,
  RTRIM(YAFUT27) AS yafut27,
  RTRIM(YAFUT28) AS yafut28,
  RTRIM(YAFUT29) AS yafut29,
  RTRIM(YAFUT30) AS yafut30,
  YAFUT31 AS yafut31,
  YAFUT32 AS yafut32,
  YAFUT33 AS yafut33
FROM LGDAT.PLNT
