View previous topic :: View next topic
|
Author |
Message |
ESSPRABHU
New User
Joined: 11 Oct 2005 Posts: 22
|
|
|
|
HI,
Can any of you please tell the coding logic in EASYTRIEVE for the below SQL query.
SELECT DEPT NAME MAX(SAL)
FROM PRSNL-FILE
GROUP BY DEPT
ie. while creating a report, using Easytreive, with fields ( DEPT NAME SAL ) I have to calculate the max salary of each department.
Let me know if you need any further details.
Thanks in advace,
Prabhu. |
|
Back to top |
|
|
socker_dad
Active User
Joined: 05 Dec 2006 Posts: 177 Location: Seattle, WA
|
|
|
|
Yawn.
Yet another homework assignment?
You have already answered your own question. The DB2 query will retireve the max salary for each department. All you have to do now is format the report.
-----------------
Whay don't you students get study buddies? |
|
Back to top |
|
|
ESSPRABHU
New User
Joined: 11 Oct 2005 Posts: 22
|
|
|
|
Hellow,
Instead of giving my requirement in words , I have given it in the form of SQL query.
We are not using DB2. I have to do that type of (finding max value) calculation using Easytreive. that's why I have asked Easytrieve logic. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Does EASYTRIVE not have inbuilt functions such as MAX, MIN, MEAN ? |
|
Back to top |
|
|
socker_dad
Active User
Joined: 05 Dec 2006 Posts: 177 Location: Seattle, WA
|
|
|
|
ESSPRABHU wrote: |
Hellow,
Instead of giving my requirement in words , I have given it in the form of SQL query.
We are not using DB2. I have to do that type of (finding max value) calculation using Easytreive. that's why I have asked Easytrieve logic. |
Did you try reading your Easytrieve manual? I found the answer rather easily (no pun intended).
-----------------------------------------------------------------------
Since you are trying to steal my job, at least earn it. Don't expect me to hand it to you on a silver platter. |
|
Back to top |
|
|
|