I need help in concatenating the results of an SQL into a single string.
Is there an aggregate grouping function on string in DB2?
SQL: Select FirstName from Employee
This returns all the rows in the Employee table with just the FirstName Column. Instead of multiple rows, I want to return just one string with all the values of the rows concatenated and seperated by ",". Can this be done in DB2 procedure or SQL?
Unlike in the thread you forwarded, I am doing this in a procedure and I can declare a temporary variable and loop through the result rows and concatenate the values to this temporary variable. I am just not familiar with SQL syntax to do this. I am thinking there should be a simpler program to accomplish this. Any help is greatly appreciated