pivot和unpivot函数用法,unapt UNPIVOT的应用 select distinct NO,YEAR,MONTH,budgetversion,ISNULL(Sales,0) AS Sales, … getImport_History where YEAR=YEAR(GETDATE()) 结果集 select * from (结果集)A UNPIVOT( Budget_Amount(要取值) for attribute(要取字段) in( [Sales] … ,Trade ) ) as upv Published by 风君子 独自遨游何稽首 揭天掀地慰生平 View all posts by 风君子