The SQL statement that will run is the concatenation of the current effective dated from table EQTN_SQL_CHUNKS. This can be different from field EQTN_SQL_TEXT on table EQTN_SQL_TBL.
1) DELETING a row from EQTN_SQL_TBL does not automatically delete from EQTN_SQL_CHUNKS. To properly delete it you need to (a) blank out the SQL for that effective date and save, then (b) delete the effective date and save again. Simply deleting the effective date and saving will leave that effective date and SQL on EQTN_SQL_CHUNKS.
SELECT * FROM PS_EQTN_SQL_CHUNKS A WHERE NOT EXISTS ( SELECT 1 FROM PS_EQTN_SQL_TBL B WHERE B.EQTN_OPERAND_SQL = A.EQTN_OPERAND_SQL AND B.EFFDT = A.EFFDT );
2) A few years ago, I observed that a maximum SQL length of about 7800 characters was being applied when the call SQL statement was performed by the equation engine. I don't know whether that limit is universal or whether it was specific to that installation.
3) While rare, I have observed a few instances (at different organizations) where the concatenation from EQTN_SQL_CHUNKS did not match that on EQTN_SQL_TEXT. This is typically resolved by making a minor alteration to the offending SQL, saving, and confirming that the two tables align.
------------------------------
Jared Jakeman
App Development and Integrations
Central Washington University
------------------------------