Very impressive. This is not what we do in a lost after-noon, do we ?
I consider myself as pretty proficient in T-SQL, but for me these procedures are too complicated. In spite of all the databases I have built the last few years (all based on quite a few non-obvious T-SQL stored procedures), I must confess that I do not understand how these procedures have been built up.
So, I must trust Mr. Andre Vigneau for his professionality (no reason to doubt about it).
By the way: in order to have the procedure run, I had to replace three times "('ntext', 'text')" with "('ntext', 'text', 'image')" in the final Stored Procedure.