Is it possible to do the below.
ws-prd-codes is 'AH', 'AJ', 'A8', 'AK', 'AM', 'AO'
The SQL is
EXEC SQL
SELECT COUNT(*)
INTO :WS-NUMBER-CLOSED
FROM CALL
WHERE CLIENT_NO = :SP017-CLIENT-NO
AND SITE_NO = :SP017-SITE-NO
AND PRD_BASE_CD IN WS-PRD-CODES)
AND CALL_STATUS_CD IN ('C', 'U')
AND CALL_CLOSE_DT
BETWEEN :WS-START-MONTH AND :WS-END-MONTH
END-EXEC
When I execute this SQL, the count is zero. When I hard code the code in the SQL, the count is 10.
Please help.
ws-prd-codes is 'AH', 'AJ', 'A8', 'AK', 'AM', 'AO'
The SQL is
EXEC SQL
SELECT COUNT(*)
INTO :WS-NUMBER-CLOSED
FROM CALL
WHERE CLIENT_NO = :SP017-CLIENT-NO
AND SITE_NO = :SP017-SITE-NO
AND PRD_BASE_CD IN WS-PRD-CODES)
AND CALL_STATUS_CD IN ('C', 'U')
AND CALL_CLOSE_DT
BETWEEN :WS-START-MONTH AND :WS-END-MONTH
END-EXEC
When I execute this SQL, the count is zero. When I hard code the code in the SQL, the count is 10.
Please help.