Re: matrix transpose in SQL?

From: Mik harakiri <nospam_at_newsranger.com>
Date: Thu, 26 Apr 2001 18:30:50 GMT
Message-ID: <uPZF6.6750$QV4.573533_at_www.newsranger.com>


In article <9c9l22$f9g$1_at_stlnews.stl.ibm.com>, Aakash Bordia says...
>
>Hello, Can we do matrix transpose (row become columns and columns become
>rows) in standard SQL?
>eg:
>
>1 2 3
>4 5 6
>7 8 9
>
>changes to
>
>1 4 7
>2 5 8
>3 6 9
>
Depends how do you want to represent matrix. If, for example, like this

table Matrix (
row NUMBER,
column NUMBER,
data NUMBER
)

then transposition is just a trivial matter of renaming columns in RA or aliasing in SQL. Received on Thu Apr 26 2001 - 20:30:50 CEST

Original text of this message