我不想创建聚合函数 ( sum, count, max
)。PIVOT
需要那个。
我的问题是,早在我出生之前的某个人可能将数据“读取”为两列,实际上应该是每列 1 个值的列数据,乘以“n”条记录。
他们的数据集:
(RECORDSET, NAME, VALUE)
(1, FIELD1, char1-1)
(1, FIELD2, char2-1)
(1, FIELD3, int3-1)
(1, FIELD4, char4-1)
(…)
(…)
(…)
(1, FIELD26, float26-1)
(2, FIELD1, char1-2)
(2, FIELD2, char2-2)
(2, FIELD3, int3-2)
(2, FIELD4, char4-2)
(…)
(…)
(…)
(2, FIELD26, float26-2)
(3, FIELD1, char1-3)
(3, FIELD2, char2-3)
(3, FIELD3, int3-3)
(3, FIELD4, char4-3)
(…)
(…)
(…)
(3, FIELD26, float26-3)
我需要每组 26 条记录是这样的:
FIELD1......FIELD2......FIELD3......FIELD4.............FIELD 26
char1-1.....char2-1.....int3-1......char4-1............float26-1
char1-2.....char2-2.....int3-2......char4-2............float26-2
char1-3.....char2-3.....int3-3......char4-3............float26-3
等等。