Master Table
Code   UserName
1      UserOne
2      UserTwo
3      UserThree
Details Table
Code  UserCode  ParamName  ParamValue
1  1  NameOne  ValueOne
1  1  NameTwo  ValueTwo
1  1  NameThree  ValueThree
and so on
The above is my Master and Details table. I wanna write a query which will convert the rows of details table into columns. The desired output is given below:
Code  UserCode  NameOne  NameTwo  NameThree     and so on
1  1  ValueOne  ValueTwo  ValueThree     and so on
How can I achieve this? Any suggestion will be great in advance.
 
     
     
    