Time to re visit the database design, normalisation wouldn't go amiss here.
The script itself uses 4 variables of 256 each but the dynamic sql variable is only 999 and mixing non Unicode and Unicode values!!
Do yourself a favour and don't run the script, re design your database instead
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉