我下面有下面的“数据透视表”表。我想重命名以下字段:IN([帐户别名],[操作完成],[帐户别名光纤集],[WIP移动],[光纤RTS],[WIP问题],[光纤废料] tatus] < / p>
,[WIP Issue Fiber Set]) to something else. For example [Account Alias] to TotalScrap, [Op Completion] to JobCompleted, and so on for the other column
/****** Script for SelectTopNRows command from SSMS ******/
选择* FROM
(选择
[MES_MACHINE]为[LineNo]
,[DJ_NUMBER] AS [TubeJobNo]
,[PROCESSING_ACTION]
- ,[项目编号]
,[TRANSACTION_QTY]
FROM [StagingDB]。[dbo]。[AFL_MES2O_Interface_Data_arch])AS SourceData
皮沃特(
SUM(TRANSACTION_QTY)
FOR PROCESSING_ACTION
IN([帐户别名]
,[操作完成]
,[帐户别名光纤集]
,[在制品移动]
,[光纤RTS]
,[在制品问题]
,[光纤废料]
,[工作状态]
,[WIP发行光纤集])
)AS数据透视表
按[LineNo],[TubeJobNo] DESC排序