/* Package Action Log */
/* Note ordering by ROWID is a hack - the timestamp does not have enough resolution */
SELECT alog.action_datetime, 
	   usr.FULL_NAME,
       usr.USER_EMAIL, 
       acttype.description as acttype, 
       alog.description,
       TO_CHAR(alog.action_timestamp, 'Dy DD-Mon-YYYY HH24:MI:SSxFF1') as action_timestamp
  FROM ACTION_LOG alog, ACTION_TYPE acttype, USERS usr
 WHERE alog.PV_ID = :PV_ID
   AND alog.ACTTYPE_ID = acttype.ACTTYPE_ID 
   AND alog.USER_ID = usr.USER_ID
 ORDER BY ( TO_CHAR(alog.action_timestamp, 'YYYYMMDDHH24:MI:SSxFF') || alog.ROWID ) DESC  


