本文介绍了在SQL中选择Row As Column的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要那个
选择SQL ROW
作为SQL COLUMNS
例子
I Need that
Select SQL ROW
as SQL COLUMNS
Example
Select
ProductCode,
CustomerCode,
Sum(SALEQTY)
from PRODUCTSALE group by ProductCode,CustomerCode
ProductCode CustomerCode SALEQTY
M503DA 00000001 1
M503DA 00000002 1
M503DF 00000003 1
M503DF 00000004 3
M502DA 00000005 1
M510CF 00000006 1
M502DA 00000007 1
M502DF 00000008 9
M503DA 00000009 1
M503DF 00000010 8
M502DA 00000011 5
M510CF 00000012 1
M503DA 00000013 1
M503DF 00000014 1
M510CA 00000015 2
M515CF 00000016 1
M502DF 00000017 1
i需要产品代码作为列和Valu e SALEQTY
我该怎么办?
i need Product code As Columns and Value SALEQTY
what should i do ??
推荐答案
这篇关于在SQL中选择Row As Column的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!