Best way to Sort-n-Concatenate 5 columns

Posted by SDReyes on Stack Overflow See other posts from Stack Overflow or by SDReyes
Published on 2010-05-11T20:34:09Z Indexed on 2010/05/11 20:44 UTC
Read the original article Hit count: 220

Having five columns containing numeric values

 A | B | C | D | E
-------------------
 2 | 3 | 4 | 1 | 5
 3 | 6 | 1 | 5 | 4
 4 | 5 | 7 | 1 | 3

I want to obtain the concatenation of the values after sort them:

   ABCDE
-----------
 1 2 3 4 5
 1 3 4 5 6
 1 3 4 5 7

What is the best way to do it?

© Stack Overflow or respective owner

Related posts about sql

Related posts about sql-server-2008