pipekit/config/modules/cret.sql
Paul Trowbridge 6a3ac0e436 Add Bucket 1 CMS→pipekit modules (41 tables)
Full-reload modules for the CMS/DB2 tables migrated off /opt/sync, landing
in cms.*. Columns introspected fresh from DB2 (QSYS2.SYSCOLUMNS). Three large
tables use incremental merge ported from the legacy sync instead of full
reload: iprcctn/iprccto (date watermark on t8date/t7date), ffpdglr1 (fiscal-
period watermark via rprh join, keyed on btid).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-27 12:33:48 -04:00

31 lines
986 B
SQL

SELECT
B86COMN AS b86comn,
RTRIM(B86CURC) AS b86curc,
RTRIM(B86RTTY) AS b86rtty,
B86EFYY AS b86efyy,
B86EFPP AS b86efpp,
CASE WHEN B86EDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE B86EDAT END AS b86edat,
B86SRTE AS b86srte,
RTRIM(B86CUSR) AS b86cusr,
CASE WHEN B86CDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE B86CDAT END AS b86cdat,
B86CTME AS b86ctme,
RTRIM(B86UUSR) AS b86uusr,
CASE WHEN B86UDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE B86UDAT END AS b86udat,
B86UTME AS b86utme,
RTRIM(B86FUT1) AS b86fut1,
RTRIM(B86FUT2) AS b86fut2,
RTRIM(B86FUT3) AS b86fut3,
RTRIM(B86FUT4) AS b86fut4,
RTRIM(B86FUT5) AS b86fut5,
RTRIM(B86FUT6) AS b86fut6,
B86FUT7 AS b86fut7,
B86FUT8 AS b86fut8,
B86FUT9 AS b86fut9,
B86FUTA AS b86futa,
RTRIM(B86FLG1) AS b86flg1,
RTRIM(B86FLG2) AS b86flg2,
RTRIM(B86FLG3) AS b86flg3,
RTRIM(B86FLG4) AS b86flg4,
RTRIM(B86FLG5) AS b86flg5
FROM LGDAT.CRET