Want to merge the duplicate data, so that repeated data can have multiple, need to be merged, red box of the data has a comma to merge, the great spirit guide,
Urgent urgent!!!!!!!!!!!!!!
CodePudding user response:
The select f1, f2, f3, f4 and f5, replace (replace (xml2clob (xmlagg (xmlelement (NAME A, f6 | | ', '))), '& lt; A> ', ' '), '& lt;/A> ', ' ') FROM the TB GROUP BY f1, f2, f3, f4 and f5Including f1, f2, f3, f4 and f5 to grouping columns, then f6 is to merge the column, there's no need to change the NAME A, only XML tags,
CodePudding user response:
Do it, as if a function list_agg have this effectCodePudding user response:
The select f_id listagg (type, ', ') from tb_name group by f_idCodePudding user response:
Use listagg functions to merge