fix sql scripts on oracle and sqlserver