You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
STUFF( ( SELECT ',' + CONVERT(NVARCHAR(20), StudentId) FROM Student WHERE condition = abc FOR xml path('') ) , 1 , 1 , '')
--f the StudentId is coming from a non varchar column, you will probably get a conversion exception. You need to use the CONCAT function to do proper concatenation