# Select from influxDB value null

**URL:** <https://community.influxdata.com/t/select-from-influxdb-value-null/12018>\
**Category:** Store\
**Tags:** influxdb, influxql, query\
**Created:** [November 21, 2019, 1:42pm UTC](https://community.influxdata.com/t/select-from-influxdb-value-null/12018 "2019-11-21T13:42:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisH](https://avatars.discourse-cdn.com/v4/letter/c/6de8d8/32.png) [@chrisH](https://community.influxdata.com/u/chrisH)\
**Post date:** [November 21, 2019, 1:42pm UTC](https://community.influxdata.com/t/select-from-influxdb-value-null/12018/1 "2019-11-21T13:42:01Z")

</div>

Hello,

Influxdb version: 1.7.6

I have a problem to request (select) values called “null”.

I have a 1st script (launched once a day) that updates 2 field (host, value\_op) for LOSS measurement.

Then, I have a 2nd script launched every 5 minutes, which updates the field “value”.

So, for data, I sometimes have empty values for some tag.

I would like to recover only the non-zero values of “value”.

> SELECT value,value\_op FROM LOSS WHERE (host =~ /^toto/);  
> name: LOSS  
> time value value\_op

* * *

1574258100000000000 1  
1574258400000000000 1  
1574258700000000000 1  
1574259000000000000 1  
1574259300000000000 1  
1574259600000000000 1  
1574259900000000000 1  
1574260200000000000 1  
1574260500000000000 1  
1574260800000000000 1  
1574261100000000000 1  
1574261400000000000 1  
1574261700000000000 1  
1574262000000000000 1  
1574262300000000000 1  
1574262600000000000 1  
1574262900000000000 0 1  
1574263200000000000 0 1  
1574263500000000000 0 1  
1574263800000000000 0 1  
1574264100000000000 0 1  
1574264400000000000 0 1  
1574264700000000000 0 1  
1574265000000000000 0 1  
1574265300000000000 0 1  
1574265600000000000 0 1  
1574265900000000000 0 1  
1574266200000000000 0 1  
1574266500000000000 0 1  
1574266800000000000 0 1  
1574267100000000000 0 1  
1574267400000000000 0 1  
1574267700000000000 0 1  
1574268000000000000 0 1

I would like to recover only the non-zero values of “value”.

> SELECT value,value\_op FROM LOSS WHERE (host =~ /^toto/ and value!=‘’);

> SELECT value,value\_op FROM LOSS WHERE (host =~ /^toto/ and value !~ /./);

I have no results.

Is it possible to ignore the null values in a select influxdb query?

Regards,

Chris.

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [January 16, 2020, 3:21pm UTC](https://community.influxdata.com/t/select-from-influxdb-value-null/12018/2 "2020-01-16T15:21:15Z")

</div>

Hello @chrisH,  
Is this helpful to you? [TL;DR InfluxDB Tech Tips - Eliminate Blank Field Values in Query Results & More! | InfluxData](https://www.influxdata.com/blog/tldr-influxdb-tech-tips-february-16-2017/)
