Hi,
I've a query from 2 tables that give me a table like this as an answer:
And due to the fact that this query is the base to populate a grid with this data I want to present my result in this other way:
maybe I'm just stupid but I had a lot of difficulties in implement recursive queries and the DB2 version we got does not support XML nor LISTAGG.
Any suggestion?
Thanks in advance
Emiliano
I've a query from 2 tables that give me a table like this as an answer:
Code:
select a.COL1, a.COL2, a.COL3, a.COL4, b.COL5 from db2.tb1 a, db2.tb2 b where a.COL1 = b.COL1 and a.COL1 = "VAL1"
COL1 COL2 COL3 COL4 COL5
VAL1 VAL2 VAL3 VAL4 PRB1
VAL1 VAL2 VAL3 VAL4 PRB2
And due to the fact that this query is the base to populate a grid with this data I want to present my result in this other way:
Code:
COL1 COL2 COL3 COL4 COL5
VAL1 VAL2 VAL3 VAL4 PRB1,PRB2
maybe I'm just stupid but I had a lot of difficulties in implement recursive queries and the DB2 version we got does not support XML nor LISTAGG.
Any suggestion?
Thanks in advance
Emiliano