Reputation: 197
I have this:
a b c
"aa" "bb" "cc"
"aaa" "bbb" "ccc"
I want to end up with -,|,/,\ in between or any other third string:
a b c ab
"aa" "bb" "cc" "aa-bb"
"aaa" "bbb" "ccc" ""aaa-bbb"
for example
Upvotes: 0
Views: 3867
Reputation: 1697
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"
Upvotes: 4