# Error Running Query

**URL:** <https://forum.inductiveautomation.com/t/error-running-query/3970>\
**Category:** Ignition\
**Created:** [February 8, 2012, 8:43pm UTC](https://forum.inductiveautomation.com/t/error-running-query/3970 "2012-02-08T20:43:04Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![fivecents](https://avatars.discourse-cdn.com/v4/letter/f/d9b06d/32.png) [@fivecents](https://forum.inductiveautomation.com/u/fivecents)\
**Post date:** [February 8, 2012, 8:43pm UTC](https://forum.inductiveautomation.com/t/error-running-query/3970/1 "2012-02-08T20:43:04Z")

</div>

In groups table1 (name) ,checked automatically create table.  
Then I save and enable and it gives error message Select\*From table1  
Table “test2.table1 doesn’t exist”.

Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![Robert.McKenzie](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/robert.mckenzie/32/4134_2.png) [@Robert.McKenzie](https://forum.inductiveautomation.com/u/Robert.McKenzie)\
**Post date:** [February 9, 2012, 12:21am UTC](https://forum.inductiveautomation.com/t/error-running-query/3970/2 "2012-02-09T00:21:18Z")

</div>

It looks like you database name is ‘test2’, is that right?

---

<div class="post-metadata">

**Author:** ![fivecents](https://avatars.discourse-cdn.com/v4/letter/f/d9b06d/32.png) [@fivecents](https://forum.inductiveautomation.com/u/fivecents)\
**Post date:** [February 9, 2012, 1:10am UTC](https://forum.inductiveautomation.com/t/error-running-query/3970/3 "2012-02-09T01:10:07Z")

</div>

Yes test2 is the database name.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [February 9, 2012, 1:48am UTC](https://forum.inductiveautomation.com/t/error-running-query/3970/4 "2012-02-09T01:48:49Z")

</div>

Okay, what sort of things do you have the group doing?

---

<div class="post-metadata">

**Author:** ![fivecents](https://avatars.discourse-cdn.com/v4/letter/f/d9b06d/32.png) [@fivecents](https://forum.inductiveautomation.com/u/fivecents)\
**Post date:** [February 9, 2012, 3:07am UTC](https://forum.inductiveautomation.com/t/error-running-query/3970/5 "2012-02-09T03:07:38Z")

</div>

It is a standard transaction group.  
No triggers .  
Update rate 3 seconds. OPC\>DB.  
No options.

---

<div class="post-metadata">

**Author:** ![Dravik](https://avatars.discourse-cdn.com/v4/letter/d/e274bd/32.png) [@Dravik](https://forum.inductiveautomation.com/u/Dravik)\
**Post date:** [February 9, 2012, 4:46am UTC](https://forum.inductiveautomation.com/t/error-running-query/3970/6 "2012-02-09T04:46:42Z")

</div>

Dumb question, but what permissions does the user you have the DB mapped as possess?(That user needs create and alter permissions to ‘Automatically Create Table’)

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [February 9, 2012, 4:40pm UTC](https://forum.inductiveautomation.com/t/error-running-query/3970/7 "2012-02-09T16:40:20Z")

</div>

Hi,

It sounds like Ignition is inferring the “schema” name, and perhaps it’s working correctly in order to check the table, but then not when it tries to write to it.

What database system are you using? Does the table actually exist (can you see it if you go to Ignition’s query browser)? I suspect the solution will be to find the full path for the table and put that in the group’s “table name”. For example, the full path on SQL Server might be “dbo.test2.table1”. Problems like this tend to come up with the database owner is different, though, so if you are are using SQL Server, it may be that it should be something other than “dbo”.

Regards,

---

<div class="post-metadata">

**Author:** ![fivecents](https://avatars.discourse-cdn.com/v4/letter/f/d9b06d/32.png) [@fivecents](https://forum.inductiveautomation.com/u/fivecents)\
**Post date:** [February 15, 2012, 3:40pm UTC](https://forum.inductiveautomation.com/t/error-running-query/3970/8 "2012-02-15T15:40:31Z")

</div>

I was the problem. Just not sure how. I deleted database and table and recreated and it works now.

Thanks for the replies.

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [February 15, 2012, 5:56pm UTC](https://forum.inductiveautomation.com/t/error-running-query/3970/9 "2012-02-15T17:56:16Z")

</div>

Great. Sounds like the “database owner” might have been set to something unexpected the first time you created it.

Regards,
