# Named Queries in script escape tag paths wrong

**URL:** <https://forum.inductiveautomation.com/t/named-queries-in-script-escape-tag-paths-wrong/48603>\
**Category:** Ignition\
**Created:** [July 8, 2021, 12:26pm UTC](https://forum.inductiveautomation.com/t/named-queries-in-script-escape-tag-paths-wrong/48603 "2021-07-08T12:26:40Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![r.p](https://avatars.discourse-cdn.com/v4/letter/r/71e660/32.png) [@r.p](https://forum.inductiveautomation.com/u/r.p)\
**Post date:** [July 9, 2021, 2:21pm UTC](https://forum.inductiveautomation.com/t/named-queries-in-script-escape-tag-paths-wrong/48603/9 "2021-07-09T14:21:11Z")

</div>

> [@dkhayes117](#):
>
> ow, you cannot make the table name dynamic in a named query. This would have been identified much quicker if you would have included your query in the original post. Anyway, you would be better served by [system.db.runPrepQuery()](https://docs.inductiveautomation.com/display/DOC81/system.db.runPrepQuery).

yes but the problem affected several complex queries and I didn't see some also had the table name as parameter, anyway I found this has been solved in the forum here: [How to pass a table name parameter to named query?](http://forum.inductiveautomation.com/t/how-to-pass-a-table-name-parameter-to-named-query/32689)

Marking as solved, thank you

---

_[View the full topic](https://forum.inductiveautomation.com/t/named-queries-in-script-escape-tag-paths-wrong/48603)._
