Hello, I have the following Outter Apply that is used to get 1 of possible many notes. I need to change statement to concatenate all the notes while adding a visible separator which could be a line break some ***** and a line break to have separation between notes. What would be the best way to accomplish? How to modify the following?
OUTER APPLY (
SELECT TOP(1) n.NoteText
FROM OBJECT_NOTE n
WHERE n.NoteType = 4
AND n.OwnerObjectRegistryId = cs.ObjectRegistryId
ORDER BY n.EntryDate DESC
Microsoft SQL Server 2008Microsoft SQL ServerMicrosoft SQL Server 2005