/* Computer Users */
SELECT DECODE ( usr.IS_ONLINE,
	   		  	NULL, NULL,
				'<img src="images/i_online.gif" title="User is online at '|| usr.ONLINE_AT  ||'" width="16" height="16" border="0" hspace="2">' ) AS user_online,
	   DECODE ( usr.IS_DISABLED,
	   		  	NULL, 'LIMG_USER',
				'LIMG_USER_DISABLED' ) AS user_image,
	   usr.USER_ID,
	   usr.FULL_NAME,
	   usr.USER_NAME,
	   usr.IS_ONLINE,
	   usr.ONLINE_AT
  FROM (
  	    SELECT DISTINCT lt.USER_NAME
		  FROM LOGIN_TRAIL lt
		 WHERE lt.CLIENT_IP = :CLIENT_IP	  
  	   ) cip,
  	   USERS usr
 WHERE cip.USER_NAME = usr.USER_NAME
ORDER BY UPPER(usr.FULL_NAME) 