Is there a way to escape single quotes on the fly, without having to escape every occurrence of a single quote with two single quotes?
I'm looking for a T-SQL equivalent of PL/SQL's quote literal q'[this is PL SQL's quoted literal]'
Just to clarify for future viewers/readers...
Legacy XSL stylesheet which has lots and lots of single and double quotes strewn all over the place is also stored in the database. Every time a change is made to this stylesheet it also needs to be updated in a database column where it is stored.
While I agree it is easy to find and replace all occurrences of a single quote with two single quotes and insert/update the xml value as a string, which is how it was done until now. Two versions had to be done, a script for the stylesheet and the stylesheet itself.
I was looking for a better solution.
@Charlieface's solution fits my requirements