Unanswered: SQLCODE -111 column function/column name
I have been getting the following error message
ERROR: A COLUMN FUNCTION DOES NOT INCLUDE A COLUMN NAME
when trying to run a simple Select query including one column function, count. I find no problems withthe syntax. Any clues?
Here is the code:
SELECT A.FSCL_YR_WK_KEY_VAL, B.MER_DEPT_NBR,
A.STR_NBR, COUNT(A.SKU_NBR) AS IS
FROM TABLE1 A, TABLE2 B, TABLE3 C, TABLE4 D
WHERE ((A.SKU_NBR = B.SKU_NBR) "
AND (A.SKU_NBR = C.SKU_NBR)
AND (A.STR_NBR = D.STR_NBR)
AND (C.MKT_NBR = D.MKT_NBR)
AND (C.SKU_STAT_CD = 100)
AND (B.SKU_TYP_CD = 'N')
AND (A.OH_QTY = 1))
GROUP BY A.FSCL_YR_WK_KEY_VAL, B.MER_DEPT_NBR, A.STR_NBR
HAVING (A.FSCL_YR_WK_KEY_VAL = '200416')"