AndersonCJA
Programmer
Hi,
I have a simple report and want to add a column using an sql expression. Alone the report runs fine, and alone the sql expression works fine, when the sql expression is added to the report, the report runs and runs and runs and runs I finally have to end it abnormaly. I can use any help or advice.
Thank you in advance so much for taking the time to help
SQL EXPRESSION =
(SELECT
LTRIM(TO_CHAR(TABLE6.AMTDUE,'$999,999,999.99')) AMTDUE
FROM
TABLE5 TABLE5,
TABLE6 TABLE6
WHERE
TABLE1."CUST#" = TABLE5."CUST#" AND
TABLE6.CUST# = TABLE5.CUST# AND
TABLE6.SUBCUST# = TABLE5.SUBCUST# AND
TABLE5.DCD = 'AE'' AND
TABLE5. DTYP = 'IO' AND
TABLE6.DATE =
(SELECT MAX(Z.DATE)
FROM TABLE6 Z
WHERE Z.CUST# =TABLE6.CUST# AND
Z.SUBCUST# = TABLE6.CUST#))
I have a simple report and want to add a column using an sql expression. Alone the report runs fine, and alone the sql expression works fine, when the sql expression is added to the report, the report runs and runs and runs and runs I finally have to end it abnormaly. I can use any help or advice.
Thank you in advance so much for taking the time to help
SQL EXPRESSION =
(SELECT
LTRIM(TO_CHAR(TABLE6.AMTDUE,'$999,999,999.99')) AMTDUE
FROM
TABLE5 TABLE5,
TABLE6 TABLE6
WHERE
TABLE1."CUST#" = TABLE5."CUST#" AND
TABLE6.CUST# = TABLE5.CUST# AND
TABLE6.SUBCUST# = TABLE5.SUBCUST# AND
TABLE5.DCD = 'AE'' AND
TABLE5. DTYP = 'IO' AND
TABLE6.DATE =
(SELECT MAX(Z.DATE)
FROM TABLE6 Z
WHERE Z.CUST# =TABLE6.CUST# AND
Z.SUBCUST# = TABLE6.CUST#))