This content has been marked as final. Show 4 replies
"Pivot" worked great .. but since the same ID may have multiple IN and OUT entries on same date .. using aggregate function will choose only a single value for IN and OUT.
My code looks like
WITH st_pivot AS ( SELECT ID , TO_CHAR(TIME,'dd-mm-yyyy') AS EDAY , action , time FROM timesheet_exercise ) SELECT * FROM st_pivot PIVOT ( MAX(TO_CHAR(TIME,'hh:mi PM')) FOR ACTION IN (1, 2 , 3) )
If want to display all IN and OUT entries for the same id for a specific date, how to do it ?
Any help please ?
Thank you so much for your time.