How can I rewrite the query “select col1 from tbl1” so it splits the results into three columns – each column sorting the results vertically?
So if the data I’m getting back is:
aaa
bbb
ccc
ddd
eee
fff
ggg
I need the query to return it as:
aaa ddd ggg
bbb eee
ccc fff
Is this possible? Thanks
In truth, this should not be done in SQL. Unless the pairing of aaa, ddd, and ggg has some meaning then this is client-side formatting and shouldn’t be done on the server.
EDIT:
In the interests of an intellectual exercise, something like this seems to work.
But, again, I suspect that this is really something that should be done client-side, NOT in SQL.