-1
列表創建列我有以下數據:如何從價值
Table 1
Row ID Value Cost
1 1 Priority 1 10,000
2 2 Priority 2 9,000
3 3 Priority 3 8,000
4 4 Priority 4 6,000
Table 2
Row Name Priority Cost
1 Jon 1 10,000
2 Bob 3 8,000
3 Dan 4 7,000
4 Steve 2 9,000
5 Bill 3 8,000
...
我想表看起來像這樣:
Table 3
Row Name Priotity 1 Priority 2 Priority 3 Priority 4
1 Jon 10,000
2 Bob 8,000
3 Dan 7,000
4 Steve 9,000
5 Bill 8,000
...
如何創建行從表1列,並填寫輸出,如表3所示。
我希望這不像它聽起來那麼基本,但我的SQL很糟糕!
谷歌:「<數據庫名稱>動態轉動」。 –