× 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.



You are standing in an open field west of a white house, with a boarded front door.
There is a small mailbox here. It is dark. You are likely to be eaten by a grue.



"James H. H. Lampert" <jamesl@xxxxxxxxxxxxxxxxx> wrote in message news:mailman.3097.1367263252.7202.midrange-l@xxxxxxxxxxxx...
On 4/29/13 12:04 PM, rob@xxxxxxxxx wrote:
I agree with Buck. If you have
select customernumber, customerName, sum(orderDollars) as
TotalOrderDollars
from orderheader
group by customernumber

you will get that error because customerName is not in the group by, nor
is it in any summary functions. Is this why?

It could very well be. The query in question is over 170 lines long, and has multiple constructs of the form

. . .left join (select foo, bar, baz . . . from ham, eggs, spam where . . . group by . . . ) as frobozztable on . . . left join . . .

and with my meager understanding of SQL, I'm having trouble breaking the thing down into individually testable pieces. Unfortunately, there "ACCOUNT_ID" appears 62 different times in the query, both as a field being referenced and as a field being defined in the temporary table declarations (or whatever those constructs are called).

Do I sound frustrated?

Further advice would be appreciated.

--
JHHL



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.