Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> date format and nesting
I have the following statements and am finding difficulty doing 2 things
formatting the date to 22-March-2002 and producing only the highest hours worked for each day, any ideas here please
SELECT TO_CHAR((N.PERS_NAME) || ' a ' || (P.POSN_NAME) || ' worked ' ||
A.ACTIV_HOURS || ' hours in ' || (U.UNIT_NAME) || ' on ' || (A.ACTIV_DATE))
FROM POSITION P,PERSONNEL N, ACTIVITY A, UNIT U WHERE P.POSN_ID=N.POSN_ID
AND N.PERS_ID=A.PERS_ID
AND A.UNIT_ID=U.UNIT_ID
ORDER BY A.ACTIV_DATE
Which gives me the following result
TO_CHAR((N.PERS_NAME)||'A'||(P.POSN_NAME)||'WORKED'||A.ACTIV_HOURS||'HOURSIN '||(
However I need to only output the person who wrks the most hrs for each day, and have tried putting Max(a.activ_hours) in the select statement, it doesn' t work.
Any help here
Also for the date I have to output in 22_march 2002 format and tried using Fm(a.activ_date, 'DD-Month-YYYY') alos tried fmFormat(...) and To_Date(...) it comes up with an error.
Ideas pls Received on Sat Apr 13 2002 - 01:59:12 CDT
![]() |
![]() |