Knowledge: Concatenate checkbox choice values
Back
Knowledge
Title*Concatenate checkbox choice values
ManualAdministration
Manual Level TwoData Rooms
Manual Level ThreeForms Design
Created13/12/2023
DetailThe STUFF() function is useful for concatenating multiple rows in to one string, so it can be used effectively with xml queries to do this as follows:
SELECT STUFF(
cast(TextField1 as xml).query('for $step in /ChoiceValues/Data/@DisplayText return concat(", ", string($step))')
.value('.', 'nvarchar(max)'),
1, 2, '')
FROM Claims WHERE ID = [Your ID]
Additional Manual Locations