# NamedQuery Not Running Multiple Queries

**URL:** <https://forum.inductiveautomation.com/t/namedquery-not-running-multiple-queries/97708>\
**Category:** Ignition\
**Tags:** scripting, perspective\
**Created:** [October 24, 2024, 6:06am UTC](https://forum.inductiveautomation.com/t/namedquery-not-running-multiple-queries/97708 "2024-10-24T06:06:59Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Samuel\_Sueur](https://avatars.discourse-cdn.com/v4/letter/s/e36b37/32.png) [@Samuel\_Sueur](https://forum.inductiveautomation.com/u/Samuel_Sueur)\
**Post date:** [October 24, 2024, 7:30am UTC](https://forum.inductiveautomation.com/t/namedquery-not-running-multiple-queries/97708/2 "2024-10-24T07:30:18Z")

</div>

Hi,

See the below post, I know you are using a NamedQuery but the same applies :

> [@PrepQuery with SQL Variable](https://forum.inductiveautomation.com/t/prepquery-with-sql-variable/66509/4):
>
> Do note that using SQL variables is SQL scripting, which isn't actually in the JDBC spec. Some drivers allow it, but you really shouldn't be doing that if you want your work to be portable. Single statements for JDBC. Scripts belong in stored procedures.

---

_[View the full topic](https://forum.inductiveautomation.com/t/namedquery-not-running-multiple-queries/97708)._
