6
SQL Server:列到行
寻找优雅的(或任何)解决方案以将列转换为行。 这是一个示例:我有一个具有以下架构的表: [ID] [EntityID] [Indicator1] [Indicator2] [Indicator3] ... [Indicator150] 这是我想要得到的结果: [ID] [EntityId] [IndicatorName] [IndicatorValue] 结果值为: 1 1 'Indicator1' 'Value of Indicator 1 for entity 1' 2 1 'Indicator2' 'Value of Indicator 2 for entity 1' 3 1 'Indicator3' 'Value of Indicator 3 for entity 1' 4 2 'Indicator1' 'Value of …
128
sql
sql-server
tsql
unpivot