Fixed sql script so it runs without errors.