# Copy from one SQL table to another

**URL:** <https://forum.inductiveautomation.com/t/copy-from-one-sql-table-to-another/20862>\
**Category:** Ignition\
**Tags:** database, ignition79\
**Created:** [November 14, 2018, 6:12pm UTC](https://forum.inductiveautomation.com/t/copy-from-one-sql-table-to-another/20862 "2018-11-14T18:12:32Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![Icom](https://avatars.discourse-cdn.com/v4/letter/i/e68b1a/32.png) [@Icom](https://forum.inductiveautomation.com/u/Icom)\
**Post date:** [June 7, 2020, 10:58pm UTC](https://forum.inductiveautomation.com/t/copy-from-one-sql-table-to-another/20862/16 "2020-06-07T22:58:52Z")

</div>

Hi again,  
Here is what I did:  
In my bouton:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/9/9bb2aad62b269d12f5f1a4ecdf404fa059903dde.png)

In my Named Query:

But I have this error:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/4/4a14b483d86f911d42c5f91ed8473a54b2793cd7.png)

Looking in the internet: I found this:

> [@Error Handling - ArrayIndexOutOfBoundsException](http://forum.inductiveautomation.com/t/error-handling-arrayindexoutofboundsexception/20011):
>
> I have a situation where I need to handle an exception due to an ArrayIndexOutOfBoundsException. In the manual, it says that this can be called out for an exception-specific failover. However, another error is thrown saying that ‘ArrayIndexOutOfBoundsException’ is not defined. Using the example code from the manual, this is the code I’m trying to use. myDataset = system.dataset.toDataSet([“colName”], [[0]]) try: print myDataset.getValueAt(0,5) except ArrayIndexOutOfBoundsException: print “…

So, I've made the correction (as said in the post import "java.lang.Exception") but sill no working. Maybe is a size array problem? Do you know this kind of issues?

Thanks

---

_[View the full topic](https://forum.inductiveautomation.com/t/copy-from-one-sql-table-to-another/20862)._
