You're getting better; you've enclosed the offending message id. Great.
Now, if you read that message further you will see
DSPMSGD RANGE(SQL0122) MSGF(QSQLMSG)
1. Display message text
-- The statement contains column name &1 and an aggregate function in
the
SELECT clause and no GROUP BY clause is specified.
...
But it's the first one. You cannot put a column in a select when you have
an aggregate function like SUM, without doing a control break on that
selected column. In SQL a control break is done with GROUP BY.
Still gotta recommend reading a getting started with sql type book. Like
http://amazon.midrange.com
SQL/400 Developer's Guide (Vol 2)Sep 2000
by Mike Cravitz and Paul Conte
Old but a great start.
Selling for as low as $7.32
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.