q)tab
items sales prices detail
-------------------------
nut 6 10 "blah"
bolt 8 20 ""
cam 0 15 "some text"
cog 3 20 ""
nut 6 10 ""
bolt 8 20 ""
我只想选择“详细信息”非空的行。看起来相当简单,但我无法让它工作。
q) select from tab where count[detail] > 0
这会给出所有行。
或者我试过
q) select from tab where not null detail
这给了我类型错误。
如何查询 KDB 中的非空字符串字段???
最佳答案
与其使用副词,不如使用 like 来简化它.
q)select from tab where not detail like ""
items sales prices detail
------------------------------
nut 1 10 "blah"
cam 5 9 "some text"
关于kdb - 在 KDB 中选择非空字符串行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52489346/