# Easy Chart Database Pens where clause error

**URL:** <https://forum.inductiveautomation.com/t/easy-chart-database-pens-where-clause-error/44579>\
**Category:** Ignition\
**Created:** [March 17, 2021, 1:58pm UTC](https://forum.inductiveautomation.com/t/easy-chart-database-pens-where-clause-error/44579 "2021-03-17T13:58:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![phuong.nguyen.sw](https://avatars.discourse-cdn.com/v4/letter/p/9de053/32.png) [@phuong.nguyen.sw](https://forum.inductiveautomation.com/u/phuong.nguyen.sw)\
**Post date:** [March 17, 2021, 1:58pm UTC](https://forum.inductiveautomation.com/t/easy-chart-database-pens-where-clause-error/44579/1 "2021-03-17T13:58:58Z")

</div>

Hi,  
I am trying create Easy Chart with Database pens when I used Where Clause script somehow I got error message even I did run diagnostic it shows zero error. I upload both configuration pictures which try to create. Please help

Here first config and script:

 ![Easy Chart Uses DataBase Config Where Clause error](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/d/7d1c8cdeff9615451ae9280c82fe0eebabbdf6c2.png) ![Easy Chart Uses DataBase Where Clause error](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/1/917ea7cd05e4671622593ab685e6b7714d48f093.png)

Here second config and script:

 ![Easy Chart Uses DataBase Config Where Clause error 2](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/5/655ac52866f3823963c34683e0fdfa9b6f5493d8.png) ![Easy Chart Uses DataBase Where Clause error 2](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/5/355e84f6716f308b0effb8bc3aa1318f3bd15ea4.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 17, 2021, 2:11pm UTC](https://forum.inductiveautomation.com/t/easy-chart-database-pens-where-clause-error/44579/2 "2021-03-17T14:11:16Z")

</div>

Leave out the WHERE keyword and everything before it. Your clause is just `Mill = 'RED2'`.

---

<div class="post-metadata">

**Author:** ![phuong.nguyen.sw](https://avatars.discourse-cdn.com/v4/letter/p/9de053/32.png) [@phuong.nguyen.sw](https://forum.inductiveautomation.com/u/phuong.nguyen.sw)\
**Post date:** [March 17, 2021, 2:41pm UTC](https://forum.inductiveautomation.com/t/easy-chart-database-pens-where-clause-error/44579/3 "2021-03-17T14:41:51Z")

</div>

wow, excellent. thank you so much.
