# SQL Update Query from Table

**URL:** <https://forum.inductiveautomation.com/t/sql-update-query-from-table/81003>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 26, 2023, 3:19am UTC](https://forum.inductiveautomation.com/t/sql-update-query-from-table/81003 "2023-10-26T03:19:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tyler\_Esters1](https://avatars.discourse-cdn.com/v4/letter/t/278dde/32.png) [@Tyler\_Esters1](https://forum.inductiveautomation.com/u/Tyler_Esters1)\
**Post date:** [October 26, 2023, 3:19am UTC](https://forum.inductiveautomation.com/t/sql-update-query-from-table/81003/1 "2023-10-26T03:19:29Z")

</div>

Hello,

I am building a warehouse page that our team manually fills data in a table throughout the day (usually done in excel). This table will have an absolute max of 30 columns.

I am wanting to write a scheduled event to run an update query at a specified time to data dump the data from each column into its respective SQL column with a time stamp

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [October 26, 2023, 5:05am UTC](https://forum.inductiveautomation.com/t/sql-update-query-from-table/81003/2 "2023-10-26T05:05:04Z")

</div>

That sounds like a fragile application design. Data will be lost during a power cycle.

A much better solution would be to write to the database on each cell commit. That way you don't lose the data. I will also consider using a "narrow" table that stores timestamp, column number and value. That will be simpler during the write routine but will require some SQL thought for data retrieval.

Tip: add the Perspective or Vision tag to your question title. It will help in getting appropriate answers.

---

<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:** [October 26, 2023, 12:19pm UTC](https://forum.inductiveautomation.com/t/sql-update-query-from-table/81003/3 "2023-10-26T12:19:32Z")

</div>

> [@Tyler\_Esters1](#):
>
> dump the data from each column into its respective SQL column

Is this Excel spreadsheet stored in the gateway filesystem? Or in a filesystem on the network reachable from the gateway with a UNC path?

If so, yes, you could use the Apache POI libraries that come with Ignition to open the file and process it as you please in a scheduled event script.
