# Taking a Dataset and Inserting it to a SQL temp table

**URL:** <https://forum.inductiveautomation.com/t/taking-a-dataset-and-inserting-it-to-a-sql-temp-table/83852>\
**Category:** Ignition\
**Created:** [January 5, 2024, 5:39pm UTC](https://forum.inductiveautomation.com/t/taking-a-dataset-and-inserting-it-to-a-sql-temp-table/83852 "2024-01-05T17:39:06Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [January 5, 2024, 6:19pm UTC](https://forum.inductiveautomation.com/t/taking-a-dataset-and-inserting-it-to-a-sql-temp-table/83852/2 "2024-01-05T18:19:22Z")

</div>

If all you're wanting to do is UNION the data, then why do you need to put it into the database at all? Does the data need to be kept in the database on the new server permanently?

Seems like query DB on old server, query data on new server, use `system.dataset.appendDataset()` to perform a union.

Otherwise, if you can use a third party application, then @pturmel's free [Integration Tool Kit Module](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934) has many tools to do this type of thing in an expression rather than script, including `UNION` and `JOIN`

---

_[View the full topic](https://forum.inductiveautomation.com/t/taking-a-dataset-and-inserting-it-to-a-sql-temp-table/83852)._
