# Dataset problem

**URL:** <https://forum.inductiveautomation.com/t/dataset-problem/7348>\
**Category:** Ignition\
**Created:** [September 30, 2013, 9:58pm UTC](https://forum.inductiveautomation.com/t/dataset-problem/7348 "2013-09-30T21:58:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henry](https://avatars.discourse-cdn.com/v4/letter/h/df705f/32.png) [@Henry](https://forum.inductiveautomation.com/u/Henry)\
**Post date:** [September 30, 2013, 9:58pm UTC](https://forum.inductiveautomation.com/t/dataset-problem/7348/1 "2013-09-30T21:58:13Z")

</div>

I have a table object that uses an SQL query to create a 1 row by 13 column dataset. I then use a numeric text filed to display the individual data value. I’m having a problem that when my dataset has a null value, the matching numeric text display doesn’t show a null or a zero but appears to have the last valid data.

Thanks

---

<div class="post-metadata">

**Author:** ![jaepark](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@jaepark](https://forum.inductiveautomation.com/u/jaepark)\
**Post date:** [October 1, 2013, 8:34pm UTC](https://forum.inductiveautomation.com/t/dataset-problem/7348/2 "2013-10-01T20:34:27Z")

</div>

You can try putting a check for None.  
if (value=None, 0, toInt(value))

or you can modify the SQL query to return 0 instead of NULL

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [October 2, 2013, 2:17pm UTC](https://forum.inductiveautomation.com/t/dataset-problem/7348/3 "2013-10-02T14:17:03Z")

</div>

An easy way to ensure that you don't return a NULL value from a SQL query is by using COALESCE in your query. Here is an example:

> [@](#):
>
> SELECT COALESCE(column1, 0) as column1

If column1 is NULL then 0 is returned.
