pivot table sqlserver
-
Hi all ; I have two tables Table1 and Table 2 (I work with sqlserver 2005) Table 1: champ1---- champ2 ---- champ3 10 ---------- 14---- aaa 10 ---------- bbb----- 15 10 ----------- 13---- ccc Table2 champ1 ------- champ4 -------- champ5 10 -------------wpm -------------- 1000 10 -------------- xcv -------------- 1200 I try to have the following results: field1 ------ yyyy------ bbb -----cccc ------ wpm------ xcv 10----------- 14------------ 15 ------ 13-------- 1000 ----- 1200 I made half with pivot table: field1 yyyy ------ ------ ----- bbb cccc 10----------- --- 14--------- 15 ------ 13 -- but I do not know how to add two columns wpm and xcv help me thank you.
-
Hi all ; I have two tables Table1 and Table 2 (I work with sqlserver 2005) Table 1: champ1---- champ2 ---- champ3 10 ---------- 14---- aaa 10 ---------- bbb----- 15 10 ----------- 13---- ccc Table2 champ1 ------- champ4 -------- champ5 10 -------------wpm -------------- 1000 10 -------------- xcv -------------- 1200 I try to have the following results: field1 ------ yyyy------ bbb -----cccc ------ wpm------ xcv 10----------- 14------------ 15 ------ 13-------- 1000 ----- 1200 I made half with pivot table: field1 yyyy ------ ------ ----- bbb cccc 10----------- --- 14--------- 15 ------ 13 -- but I do not know how to add two columns wpm and xcv help me thank you.