I'm looking for ways to concatenate two or more row values using the "|" separator. I found and used the GROUP_CONCAT()
function, but it doesn't work for me using the "DISTINCT"
clause.
Here is an example of a working and non-working query:
Working (but with a different separator, a comma (',')) -
GROUP_CONCAT(DISTINCT ROS.route_of_manufacturing) AS "RouteofSynthesis"
Not functional -
GROUP_CONCAT('|', DISTINCT ROS.route_of_manufacturing) AS "RouteofSynthesis"
What is the issue with the second query? Is there another method to do what is required?