Hello,
I would like to know if there is an easy way to transform the following table
CarId | PropertyName | PropertyValue
1 | Size | XL
1 | Name | Porsche
1 | Color | Red
2 | Size | XS
2 | Name | Smart
3 | Name | Audi
into
CarId | Size | Name | Color
1 | XL | Porsche | Red
2 | XS | Smart |
3 | | Audi |
with MSSQL 2005 (i am using Studio Express)
This a kind of crossTabling.
until now here is what i am doing:
I create a table why just 1 empty column (CarId)
For each CarId,
I put the cardId in CarId Column
For each couple (PropertyName,PropertyValue)
i test whether the column 'PropertyName' exists. If no, i create it
then i put the 'PropertyValue' in the box (x='CardId',y='PropertyName')
Thank you
Julien