FIxing oracle sql