Any fields in the Select that are not aggregate fields have to be part of the Group By
Scott
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Hoteltravelfundotcom
Sent: Friday, December 13, 2013 10:54 AM
To: Midrange Systems Technical Discussion
Subject: Re: Simple SQL Total question
I get an error message: "Column IA101 or expression in SELECT list not
valid. ""
create view PLEXT1 as
SELECT ALL
T01.IAPRT#, T01.IA101, SUM(T02.IDSHP#) AS SUMIDSHP#, T02.IDDOCD, T01.IARCC4, T01.IAPRLC,
T01.IARCC9
FROM ASTDTA.ICPRTMIA T01 INNER JOIN
ASTDTA.OEINDLID T02
ON IAPRT# = IDPRT#
WHERE IAORDF = '1'
AND IARCC4 IN ('FIN', 'PRT', 'NO')
GROUP BY T01.IAPRT#
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.