SELECT tags.TagName + ‘, ‘ AS [text()]
    FROM KnowledgeBase.KnowledgeEvents AS kevent
    JOIN KnowledgeBase.KnowledgeEventTags AS eventtags
   ON kevent.EventID = eventtags.eventID
    JOIN KnowledgeBase.Tags AS tags
   ON tags.TagID = eventtags.TagID
   WHERE kevent.EventID = 1
     FOR XML PATH(”)

Advertisements