In SQL 2008 I have a table that I want to insert a record into that has a column whose data consists of xml type elements. One of the elements I want to add is a url, which contains what SQL considers invalid characters - '&' and so on. How would I go about converting this url to a base64 string so that I can store it that way in this record.
This is similar to what the data would look like:
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs).
Being someone who is always looking for alternatives to "work your data", I came across this …