Try this:
/* Schema fix all tables.sql
By: MJW 02/05/2010
Desc: change all tables from one schema to another
*/
declare @sql varchar(8000), @table varchar(1000), @oldschema varchar(1000), @newschema varchar(1000)
set @oldschema = 'dbo'
set @newschema...