The create table temp01
(
A varchar (20),
B varchar (20)
);
Insert into temp01 values (' aa ', '12 | | 1');
Insert into temp01 values (' aa ', '13 | | 4');
Insert into temp01 values (' aa ', '3 | | 66');
Insert into temp01 values (' aa ', '4234 | | 88');
Insert into temp01 values (' aa ', '30 | |' 33);
Need to get the result:
12 | | 1, 13 | | 4, 3 | | 66423 | | 88, 30 | | 33
Just a simple query how can you do it? thank you
CodePudding user response:
Find a way, using listagg function, sweat ~
The select listagg (b, ', ') within GROUP (order by a) from the test GROUP by a;
CodePudding user response:
Encourage that.
CodePudding user response:
Used WMSYS. WM_CONCAT
11 g, please start using listagg
Saying the listagg within group behind () () seems to be fixed writing, why do so many keyword is not the default, don't know what is design
CodePudding user response: