# Passing Table Name To Named Query

**URL:** <https://forum.inductiveautomation.com/t/passing-table-name-to-named-query/35077>\
**Category:** Ignition\
**Created:** [May 27, 2020, 1:23pm UTC](https://forum.inductiveautomation.com/t/passing-table-name-to-named-query/35077 "2020-05-27T13:23:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![twstevic](https://avatars.discourse-cdn.com/v4/letter/t/a183cd/32.png) [@twstevic](https://forum.inductiveautomation.com/u/twstevic)\
**Post date:** [May 27, 2020, 1:23pm UTC](https://forum.inductiveautomation.com/t/passing-table-name-to-named-query/35077/1 "2020-05-27T13:23:12Z")

</div>

“The simple things you see are all complicated”. I have a simple named Query called Event\_Display\_Q.  
The Query is SELECT \* FROM Table\_Name. I am trying to pass a dynamic value into the Table\_Name part of the query. The Parameter is a QyeryString. I have attempted :Table\_Name, ‘:Table\_Name’, {Table\_Name}, {‘Table\_Name’}, {:Table\_Name}, and probably moe that I can not remember. Every thing I have tried gives me a syntax error. Any suggestions?

 ![Capture](https://us1.discourse-cdn.com/inductiveautomation/original/2X/9/9720ca819dd33365023f0fb9ea8fee0a5c272fb8.png) ![Capture1](https://us1.discourse-cdn.com/inductiveautomation/original/2X/c/c8e12e2dd102b0817b5f23608f116041fd1e74ff.png)

---

<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:** [May 27, 2020, 1:51pm UTC](https://forum.inductiveautomation.com/t/passing-table-name-to-named-query/35077/2 "2020-05-27T13:51:43Z")

</div>

The correct format for query string parameters is `{Table_Name}`. No colon. Any syntax error with that in the query above is caused by the string you supply.

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [May 27, 2020, 2:04pm UTC](https://forum.inductiveautomation.com/t/passing-table-name-to-named-query/35077/3 "2020-05-27T14:04:00Z")

</div>

Like Phil said.

But one handy tip for the future is you can drag and drop those parameters down into your query and they will be correctly formatted. Handy for things like QueryStrings which hopefully you aren’t using that often.
