-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很糟糕!
谷歌:“<数据库名称>动态转动”。 –