Fix for oracle and sqlserver