# How to pass WHERE IN \[values for int\] to named query as parameter

**URL:** <https://forum.inductiveautomation.com/t/how-to-pass-where-in-values-for-int-to-named-query-as-parameter/85608>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [February 13, 2024, 5:07am UTC](https://forum.inductiveautomation.com/t/how-to-pass-where-in-values-for-int-to-named-query-as-parameter/85608 "2024-02-13T05:07:48Z")\
**Posts on this page:** 1\
**Showing post:** 7

<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:** [February 13, 2024, 2:28pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-where-in-values-for-int-to-named-query-as-parameter/85608/7 "2024-02-13T14:28:53Z")

</div>

> [@lrose](#):
>
> I just use `system.db.runPrepQuery()`.

Concur. Just say **no** to QueryString parameters. Besides, you can [pass arrays to "Prep" queries](https://forum.inductiveautomation.com/t/taking-a-dataset-and-inserting-it-to-a-sql-temp-table/83852/4) if you have a competent database and JDBC drivers.

In this case, the PostgreSQL syntax for `runPrepQuery` would look like this:

```auto
SELECT * FROM some_table WHERE some_column = ANY (?)

```

> **[9.24. Row and Array Comparisons](https://www.postgresql.org/docs/current/functions-comparisons.html#FUNCTIONS-COMPARISONS-ANY-SOME)**
>
> 9.24. Row and Array Comparisons # 9.24.1. IN 9.24.2. NOT IN 9.24.3. ANY/SOME (array) 9.24.4. ALL (array) 9.24.5. Row Constructor Comparison …

---

_[View the full topic](https://forum.inductiveautomation.com/t/how-to-pass-where-in-values-for-int-to-named-query-as-parameter/85608)._
