oracle syntax fixed

assumes good quality is == 0