3
で唯一の1つの列の列への行の列を変換します私は、SQL Server 2012年にこのクエリを持っているSQL Serverクエリ
select
tblplantitle.id, tblplantoproductpayment.productid
from
tblplantitle
inner join
tblplan on tblplan.plantitleid = tblplantitle.id
inner join
tblplantoproductpayment on tblplantoproductpayment.planid = tblplan.id
group by
tblplantitle.id, tblplantoproductpayment.productid
結果はこのようなものです:
id productid
1 1
1 2
1 3
1 10
2 5
2 1
3 4
3 11
が、私はこれをしたいです結果:
1 1,2,3,10
2 5,1
3 4,11
どうすれば結果を得ることができますか?
ピボットテーブルについてお聞きしますか? – Developer