REF notification SQL query error.