365 pts.
 iSeries Token Error
Need help with this query - it will not run token error.  Here is the query:

SELECT   SUM  ("T16.CTDT".TD_DETAIL_AMT_01 * .10) AS TOTAL, "T16.CPRP".CP_DISTRICT_CODE

Software/Hardware used:
Iseries Navigator
ASKED: January 14, 2010  5:12 PM
UPDATED: January 15, 2010  4:22 PM

Answer Wiki:
As Tom noted, it appears that you are missing half of the command. The From ..join .. on .. and group by. Without the rest of the command you will get a token error. Phil
Last Wiki Answer Submitted:  January 15, 2010  3:08 am  by  philpl1jb   44,220 pts.
All Answer Wiki Contributors:  philpl1jb   44,220 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

…And the rest of the query is… what? The query isn’t complete. There is no FROM clause shown. Since there is a SUM() function and a second detail column, there should also be a GROUP BY clause.

Tom

 108,330 pts.

 

Sorry – when I copied the Query – I did not copy the whole thing. From your response, I was just missing the “Group by” with one of the same fields in the select statement. Thanks for the quick response.

 365 pts.