可能重复:
SQL Server:列到行
我想获取具有相同日期/时间的数据以组织为一行而不是多行。
这是原始数据
date time variable value
2012-11-01 18:02:07.0000000 Batch.BasisBatchSize 450.0
2012-11-01 18:02:07.0000000 Batch.BatchSize 450.0
2012-11-01 18:02:07.0000000 Batch.BatchStartTime 2012-10-30-11:20:05.786
2012-11-01 18:02:07.0000000 Batch.RecipeName MIX-CIP
2012-11-01 18:02:07.0000000 BinID[1] 0.0
2012-11-01 18:02:07.0000000 BinID[2] 0.0
2012-11-01 18:02:07.0000000 BinID[3] 0.0
2012-11-01 18:02:07.0000000 SBinID[4] 0.0
2012-11-01 18:02:07.0000000 BinID[5] 0.0
2012-11-01 18:02:07.0000000 BinID[6] 0.0
2012-11-01 18:02:07.0000000 BinID[7] 0.0
2012-11-01 18:02:07.0000000 BinID[8] 0.0
2012-11-01 18:02:07.0000000 BinID[9] 0.0
2012-11-01 18:02:07.0000000 BinID[10] 0.0
2012-11-01 18:02:07.0000000 Flavour[1].Weight 0.0
2012-11-01 18:02:07.0000000 Flavour[2].Weight 0.0
2012-11-01 18:02:07.0000000 Flavour[3].Weight 0.0
2012-11-01 18:02:07.0000000 Flavour[4].Weight 0.0
2012-11-01 18:02:07.0000000 Flavour[5].Weight 0.0
我希望它看起来像这样:
date time Batch.BasisBatchSize Batch.BatchSize
2012-11-01 18:02:07.0000000 450.0
请帮忙 :)