我有这个:
a b c
"aa" "bb" "cc"
"aaa" "bbb" "ccc"
我想最终使用 - ,|,/,\之间或任何其他第三个字符串:
a b c ab
"aa" "bb" "cc" "aa-bb"
"aaa" "bbb" "ccc" ""aaa-bbb"
例如
答案 0 :(得分:2)
q)d:flip `a`b`c!flip 2 3#'\:"abc"
q)select ab:sv'["-";flip (a;b)] from d
ab
---------
"aa-bb"
"aaa-bbb"
q)select "-"0:(a;b) from d
b
---------
"aa-bb"
"aaa-bbb"