× 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 have a sql statement that I cannot get to work the way I want.
The statement as it currently exists is.
SELECT eeun, eedpt, plbemp, eenam, plbbg1, plbhrs , plbptp FROM
PRLBH, EEMP WHERE PLBEMP = EEENO and PLBPTP in('CO','OH',
'6D','7D','OG') and
EETDT = 0 and EEDPT = '081' and PLBWDT = 20090115
GROUP BY PLBEMP,EENAM,PLBBG1, PLBHRS , PLBPTP,EEUN, EEDPT Order by
PLBEMP

I am trying to get 1 record per employee, but I cannot find the
correct solution.
What am I missing here?

If you want one record per employee, then you must group at the employee
level.

You can use (for example) MAX(EENAM) to get around some of the other
language requirements.

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"I'm living so far beyond my income that we may almost be said to be living
apart."
-- e e cummings


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.