我目前正在运行 SQL Server 2008 并尝试获取以下子查询数据:
ID | Field Name | Field Selection
1 | Rating 1 | Good
1 | Rating 2 | Good
1 | Rating 3 | Bad
2 | Rating 1 | OK
根据 ID 列分组为一行:
ID | Rating 1 | Rating 2 | Rating 3
1 | Good | Good | Bad
2 | OK | NULL | NULL
这可能吗?提前致谢!
干杯,西