SELECT qry.*
  FROM (   
  
		SELECT ut.COMPLETION_DATE ||' by '|| usr.FULL_NAME AS MSG,
			   -1 AS MSG_ID, 
			   ut.test_id,
			   ut.TEST_SUMMARY
		  FROM UNIT_TESTS ut,
		  	   USERS usr
		 WHERE ut.PV_ID = :PV_ID
		   AND ut.TEST_TYPES_FK = :enumTEST_TYPE_NOT_DONE
		   AND ut.COMPLETED_BY = usr.user_id
		   
		UNION  
		 
		SELECT DECODE( COUNT( ut.test_id ),
			   		   0, '<span class="err_alert">Required!</span>',
					   NULL
			   		 ) AS MSG, 
			   0 AS MSG_ID, 
			   TO_NUMBER( NULL ) AS test_id,
			   NULL AS TEST_SUMMARY
		  FROM UNIT_TESTS ut
		 WHERE ut.PV_ID = :PV_ID
		   AND ut.TEST_TYPES_FK <> :enumTEST_TYPE_NOT_DONE
		   
		   
	   ) qry
 ORDER BY qry.msg_id
 