Creating a "Subquery" based on a Named Query

The question here is if what I want to do is possible.

Say I have a Named Query called Query1. Query1 is quite complex and the data it returns would be re-used between other Named Queries.

Is it at all possible to make another Named Query (Query2) that operates on the data from Query1? The only option I can think of is using Query1 to create a database table and then have Query2 operate on that new table. I’m wondering if there’s another way to go about it, or some Ignition feature that I’m not aware of that allows for what I want to do.

1 Like

Each named query is independent of other named queries (and can’t see the cached results of other queries), so you’re right in thinking you need a place to store that intermediate result. Not sure if a table or a tag would be better – probably depends on your usage.

1 Like

I see, thank you!

If this is a binding situation, you might want to take a look at my view() expression function, part of the Simulation Aids Module.