>Why do you need to cast to nvarchar(max) and not varchar(max)? Are you using unicode? Also, why do you need to cast back to ntext? I don't think you need to cast back and it should work fine.
The syntax was targeting a memo field. This is why a direct REPLACE() cannot be used.
As far as replacing content from a memo field, if you have a simplest way to achieve that, I will look at it.