I have this query:
SELECT DISTINCT
f.CourseEventKey,
(
SELECT f.Title + '; ' AS [text()]
FROM @Facilities
WHERE CourseEventKey = f.CourseEventKey
ORDER BY f.Title
FOR XML PATH('')
) Facilities
FROM @Facilities f
It produces this result set:
CourseEventKey Facilities
-------------- -----------------------------------
29 Test Facility 1;
30 Memphis Training Room;
32 Drury Inn & Suites Creve Coeur;
The data is fine, but the &
is actually an encoded &
, which is not suitable for my purposes.
How can I modify this query to return the original values of the special characters in my data?