changes to oracle query