× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I guess I should give some detail... I wanted to see if I could be the
first to reply ;-)

When you use functions that operate on groups of records (SUM(),
MIN(), MAX()), Every field in your select clause must obey one of the
following rules:

1)  part of a group function
2)  included in the GROUP BY clause

So, as in your example:

Select sum(ilneprice)
>From impiln00;


Your only field obeys rule 1.  But in your second example:

select ilnsoldto, sum(ilneprice) from impiln00;


Your first field is nieither in the GROUP BY clause, nor is it part of
a group function.  This gives a rather amgibuous error while using
iSeries Access' RUN SQL SCRIPTS, and I assume this is the same error
you get in interactive SQL.

<snip>
> considering the slightly different syntax between sql for
> the iSeries and what I am used to.
</snip>

The group by rule goes for all SQL flavors that I have used.


-- 
"Enter any 11-digit prime number to continue..."

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.