Fix for SQL scripts to work in MSSQL 2005