select * from(
select a.PROJECT_ID,a.REVENUE,a.FORECAST_MONTH
from FORECAST a
)p PIVOT (SUM(REVENUE) FOR FORECAST_MONTHIN([1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12]))C
本文共 241 字,大约阅读时间需要 1 分钟。
select * from(
select a.PROJECT_ID,a.REVENUE,a.FORECAST_MONTH
from FORECAST a
)p PIVOT (SUM(REVENUE) FOR FORECAST_MONTHIN([1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12]))C
转载于:https://www.cnblogs.com/Amity/archive/2013/02/03/2890957.html