Link to home
Start Free TrialLog in
Avatar of ShareIT
ShareITFlag for Netherlands

asked on

Transpose SQL Table??

I have a table in SQL 2008 with:

Record   Fieldname        Fieldlabel  FieldValue
1                  1                 Name        Jeroen
1                  2                 Email        Info@shareit.nu
1                  3                 Active       False
2                  1                 Name       Piet
2                  2                 Email        Info@Champagne.nl
2                  3                 Active       False

I want to get an output like:

Record     Name             Email                             Active
1              Jeroen            Info@ShareIT.nu            False
2              Piet                Info@Champagne.nl       False

Any suggestions how i can do this using SQL Commands?

Thanks

Jeroen
ASKER CERTIFIED SOLUTION
Avatar of Andrei Fomitchev
Andrei Fomitchev
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ShareIT

ASKER

Thanks, I also found a similar solution using the Select Pivot syntax on:

http://stackoverflow.com/questions/1677645/using-pivot-in-sql-server-2008 

Jeroen