Hello,
I've found some documentation on transposing tables, generating crosstabs
(e.g. http://dev.mysql.com/tech-resources/articles/wizard/print_version.html).
To be honest I've to admit that I tried to figure out how it works, but I'm not
able to adopt it to my problem.
My starting table looks
Hi,
Some Body wrote:
Hi all,
I have a situation where the data in a table has to
be transposed.
I have a table having columns
id, a_id, a1, a2, a3, a4, ..., an
In the query I need a result similar to
a_id a_id a_id
2001 2002 2003
a1 1 2 1
a2 1 5 6
a3 2
Hi all,
I have a situation where the data in a table has to
be transposed.
I have a table having columns
id, a_id, a1, a2, a3, a4, ..., an
In the query I need a result similar to
a_id a_id a_id
2001 2002 2003
a1 1 2 1
a2 1 5 6
a3 2 7 2
a4 3 9
rom x x1 where x.id=x1.id and display='os') os,
(select value from x x2 where x.id=x2.id and display='ver') ver
from x
Tim
____
From: Jacob, Raymond A Jr [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 17, 2007 12:05 AM
To: mysql@lists.mysql.com
Subject:
I have a table:
Id |path1 | display| value
1 | ostype | os|windows
1 | ostype | ver |NT4
2 | ostype | os | linux
2 | ostype | ver | RHEL 5.4
That I would like to tranform into
Id | os| ver
1 |windows | NT4
2| linux |RHEL 5.4
Thank you,
Raymond
smime.p7s
I'm trying to perform a query where I transpose cell values from a table
into column names with totals. For example, I have the following table and
I'd like to produce the view at the bottom:
SitePartQuantity
Site APart 1