Re: matrix transpose in SQL?

From: Aakash Bordia <a_bordia_at_hotmail.com>
Date: Thu, 26 Apr 2001 13:13:12 -0700
Message-ID: <9c9vbp$efu$1_at_stlnews.stl.ibm.com>


Well I should have rephrased that!
Given the data like:
col1 col2 col3

1     2         3
4     5         6
7     8         9

How will we do it now?
We want our table to contain physically: 1 4 7
2 5 8
3 6 9
Thanks
Aakash

"Mik harakiri" <nospam_at_newsranger.com> wrote in message news: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 - 22:13:12 CEST

Original text of this message