SQL2005\2008行转列脚本编写(表最后列加合计列或平均数列)

此例子的语句适用于 SQL2005 以上版本 begin drop table #xstdmxFy select 提单编号,物料名称+' '+规格型号 as 产品,sum(提单数量) 数量 into #xstdmxFy from View_XstdQuery where 是否核销 ='未发运' and 备注 not like '%测试%' and 是否记账 = '是' and 是否发运 = '否'
相关文章
相关标签/搜索