# Easy Chart Database Pen Where Clause

**URL:** <https://forum.inductiveautomation.com/t/easy-chart-database-pen-where-clause/64296>\
**Category:** Ignition\
**Tags:** ignition81, vision\
**Created:** [September 20, 2022, 6:37pm UTC](https://forum.inductiveautomation.com/t/easy-chart-database-pen-where-clause/64296 "2022-09-20T18:37:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacksexton](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@jacksexton](https://forum.inductiveautomation.com/u/jacksexton)\
**Post date:** [September 20, 2022, 6:37pm UTC](https://forum.inductiveautomation.com/t/easy-chart-database-pen-where-clause/64296/1 "2022-09-20T18:37:49Z")

</div>

I have an easy chart showing a database pen pulling from a sql table.  
 ![Capture1](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/2/722b151e308d2b62aaddcb02fd97d5c845e32df3.png)  
 ![Capture2](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/3/13e7ed2616d07f4edba462a459bf0057badde8b4.png)  
At the moment there isn’t anything in the where clause to limit the time. So it is pulling from the whole table. I would like to have it limit the time based on the start date and end date showing on the easy chart itself. I have tired several things but always getting errors.

---

<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:** [September 20, 2022, 10:46pm UTC](https://forum.inductiveautomation.com/t/easy-chart-database-pen-where-clause/64296/2 "2022-09-20T22:46:33Z")

</div>

The EasyChart itself supplies those WHERE conditions to the column identified as the time column for the pen.
