SELECT * FROM  LOGS.CHECK_RIGHTS WHERE DEPOT=':DEPOTID' AND  TYPE!='OK' ORDER BY USR_NICKNAME,TYPE DESC;