答案 0 :(得分:0)
解决问题的一种方法是通过脚本循环。请参阅以下示例:
//input table
table:
load * Inline [
n, d, t1, v1, t2, v2, t3, v3
Bob, 07-jul, a, 1, b, 2, c, 3
];
//Use dummy field to setup result table.
result:
Load * Inline [DUMMY];
//Set starting position.
set k=3;
do WHILE k <= NoOfFields('table')
//result table need to exist pre loop.
Concatenate(result) Load
n as name,
d as date,
peek(FieldName($(k),'table'),0,'table') as text,
peek(FieldName($(k)+1,'table'),0,'table') as value
resident table;
let k = $(k)+2;
loop
drop field DUMMY;