I have a SQL script with more than 8000 characters and I stored it in some VARCHAR(MAX). And when execute it using:
EXEC (@script1 + @script2 + @script3 + ...)
its return 0 rows affected.
I try using replicate and get same problem. I am using SQL Server 2008.