Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003
    Posts
    7

    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')"

  2. #2
    Join Date
    Jan 2004
    Location
    UK
    Posts
    52
    Pl. post the table structures with sample data..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •