SQL Update Query from Table

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

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.

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.

1 Like