| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: matrix transpose in SQL?
Well I should have rephrased that!
Given the data like:
col1 col2 col3
1 2 3 4 5 6 7 8 9
"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 - 15:13:12 CDT
![]() |
![]() |