Hi
Could anybody help me to create some kind of Generic Aggregate concatenation in db2?
I have tables that holds this kind of data:
"dog" "big"
"dog" "strong"
"cat" "quick"
"dog" "big"
I would need a result like this:
"dog" "big, strong"
"cat" "quick"
I would like to use it for different tables, so the solution would be generic. Mainly I would need to convert (concatenate) a list to a scalar value (comma separated varchar) with handling repetitions.
Thanks:
Bence
Could anybody help me to create some kind of Generic Aggregate concatenation in db2?
I have tables that holds this kind of data:
"dog" "big"
"dog" "strong"
"cat" "quick"
"dog" "big"
I would need a result like this:
"dog" "big, strong"
"cat" "quick"
I would like to use it for different tables, so the solution would be generic. Mainly I would need to convert (concatenate) a list to a scalar value (comma separated varchar) with handling repetitions.
Thanks:
Bence
Comment