0
中组合两个更新语句我试图将两个更新语句组合在一起。这是因为如果我不一起更新,第一个更新语句将影响第二个更新语句,但我不知道如何。在kdb +
tab:update trade:`$ssr[;"-01";""]each string deal from tab where ((-1#'string trade) like enlist "0") and (-3#'string deal) like "-01"
tab:update trade:`$ssr[;"-01";"SP"]each string deal from tab where ((-1#'string trade) like enlist "1") and (-3#'string deal) like "-01";
如果我不结合,我的第一个语句可以有1到贸易和后来1秒更新语句将增加SP,因为有1
我认为最后一行输出不按要求。 – Rahul
@Rahul:是的,你说得对。我编辑了答案,但它现在几乎与你的答案一样 –