SQL2005\2008行轉列腳本編寫(表最後列加合計列或平均數列)

此例子的語句適用於 SQL2005 以上版本 begin drop table #xstdmxFy select 提單編號,物料名稱+' '+規格型號 as 產品,sum(提單數量) 數量 into #xstdmxFy from View_XstdQuery where 是否覈銷 ='未發運' and 備註 not like '%測試%' and 是否記賬 = '是' and 是否發運 = '否'
相關文章
相關標籤/搜索