select from InfluxDB where value is null

匿名 (未验证) 提交于 2019-12-03 08:36:05

问题:

If my data (conceptually) is:

#  a b c    ------- 1  1   1 2  1 1 0 3  1 0 1 

Then in legacy SQL language, the statement would be:

select * from table where b is null 

I cannot find a similar condition within the InfluxDB Query Language documentation.

I am working with data where there is optionally a numeric value in a column, and I want to select records where this column is empty/null. Since these are integers, they appear not to work with the matching regexes at all, so something like where !~ /.*/ is out.

回答1:

You cannot search for nulls in InfluxDB <0.9. You will not be able to insert nulls in Influx >=0.9



回答2:

InfluxDB dont understand NULL and will show error if use "is null" or "is not null" in the query. In order to find something which is like null we need to look for empty space ie use empty single quotes as

SELECT * FROM service_detail where username != '' 


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!