Comma Separated values
I have a the ff tables:
Users(UserID,Username)
Departments(DepartmentID,DepartmentName)
UserDepartments(UserID,DepartmentID)
I want to display the list of departments in a comma-separated fashion.
I tried using COALESCE,FOR XML PATH for these and Im having performance issues when the query returns lots of data.
Im using UDFs for coalesce. Could be the reason why Im hitting performance.
Is there any other way of doing it?
"Dont you ever give up!"
__________________
\"Dont you ever give up!\"
|