If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > SQLCODE -111 column function/column name

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-22-04, 18:27
bluebird bluebird is offline
Registered User
 
Join Date: Dec 2003
Posts: 7
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')"
Reply With Quote
  #2 (permalink)  
Old 04-27-04, 01:49
gpeee gpeee is offline
Registered User
 
Join Date: Jan 2004
Location: Calcutta, India. Currently in London
Posts: 52
Pl. post the table structures with sample data..
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On