I have a table called Rule_X_ListType in the following structure
Rue_ID ListType_ID Value
---------------------------
1 2 319
1 2 400
1 5 8150
1 5 1000
1 3 10211
2 2 400
2 6 10211
3 7 10211
3 3 8051
2 2 319
If I will give the input as Rule_ID = 1 and ListType_ID = 2, then I need the output as a string with values :
319,400
Anybody please help out…Thanks in advance…
I do not feel the neccessity for either the CTE or the FOR XML PATH.
This can be accomplished using the much more simple method of COALESCE