Convert Rows to Columns
I am using database 19c (19.10.0.0.0) I have a requirement to transpose rows to columns returned by query. Requirement is to generate dynamic columns for a report where I don't know exact no. of columns (which are actually rows)
For example, I have following rows of item code
A
B
C
D
I need to convert like below
A B C D
I used listagg function to convert rows to single column but I am not getting idea how to break in columns. Any help or idea will be highly appreciated.