/* Rejection Trail */
SELECT rt.ENUM_ENTITY_TYPE,
	   rt.ENTITY_ID,
	   rt.REJECT_SEQ,
	   rt.IS_REJECTED,
	   rt.COMMENTS,
	   'Created by '|| usr.FULL_NAME ||' ('|| usr.USER_EMAIL ||') on '|| TO_CHAR( rt.DATE_TIME_STAMP, 'DD-MON-YYYY HH24:MI:SS') AS CREATOR 
  FROM REJECTION_TRAIL rt,
  	   USERS usr
 WHERE rt.USER_ID = usr.USER_ID
   AND rt.ENUM_ENTITY_TYPE = GET_SYSTEM_VALUE( :ENUM_ENTITY_TYPE )
   AND rt.ENTITY_ID = :ENTITY_ID
 ORDER BY rt.REJECT_SEQ DESC
     