SELECT OPCODE, TO_CHAR(COLLDT, 'YYYY-MM-DD HH24:MI:SS') AS COLLDT, RECORDCNT,                    
       DECODE(OPCODE, '20', DECODE(SIGN(COLLDT - (SYSDATE - 9/60/24)), -1, 'X', 'O'),            
                            DECODE(SIGN(COLLDT - (SYSDATE - 9/60/24)), -1, 'X', 'O')) AS COMMCHK 
  FROM RUTIS.CENTERCOMM                                                                          
 WHERE COMMTYPE = '1'                                                                            
   AND OPCODE IN ('38', '39', '20')                                                              
