哪位可以帮忙看下,tmp1执行是对的,行转列就不对了。 select 年, 月, 预拌厂, 标号, 水泥 as 水泥数量,粉煤灰 as 粉煤灰数量,矿粉 as 矿粉数量,砂 as 砂数量,石 as 石数量,减水剂 as 减水剂数量,其他外加剂 as 其他外加剂数量 from ( tmp1 ) as yb pivot (max(数量) for 物料 in (水泥,粉煤灰,矿粉,砂,石,减水剂,其他外加剂)) as tsb
|
最佳回答 |
||||
5
|
|