QUOTENAME() does handle the case of imbedded single-quote characters in strings (or any other delimiter character). Try the examples from the article with delimiter character(s) in...
If you're doing inserts where the value being indexed is not increasing then a clustered index is generally a BAD idea. You'll get lots of page splits. See...