# What is the best way to query data?

**URL:** <https://forum.inductiveautomation.com/t/what-is-the-best-way-to-query-data/94195>\
**Category:** Ignition\
**Tags:** perspective, ignition81\
**Created:** [August 5, 2024, 9:31pm UTC](https://forum.inductiveautomation.com/t/what-is-the-best-way-to-query-data/94195 "2024-08-05T21:31:48Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Alejandro\_Alaco](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alejandro_alaco/32/59849_2.png) [@Alejandro\_Alaco](https://forum.inductiveautomation.com/u/Alejandro_Alaco)\
**Post date:** [August 8, 2024, 6:14am UTC](https://forum.inductiveautomation.com/t/what-is-the-best-way-to-query-data/94195/11 "2024-08-08T06:14:53Z")

</div>

The problem I found with named queries is that you can´t filter them with a multiselect of a parameter, have to do it with scripting query.

> [@Filtering table from multiselection dropdown](https://forum.inductiveautomation.com/t/filtering-table-from-multiselection-dropdown/91859/8):
>
> You cannot pass lists into single JDBC parameters. If you script your query with runPrepQuery instead of using a named query, you can dynamically generate question mark placeholders for all of the list elements, then pass the correct length argument list.

But also named queries are quite useful to have all queries well organized, easy to edit and test and can recall them from any part of the app.

---

_[View the full topic](https://forum.inductiveautomation.com/t/what-is-the-best-way-to-query-data/94195)._
