I'd like to understand the best way to restrict items in a query. For example Query1 returns a list of ID's based of specific detail filters. I would like Query2 to return only items where Query2.ID matches Query1.ID.
Which Query2 Detail Filter is better? And why?
Query2.ID IN ( Query1.ID )
Query2.ID = Query1.ID
Note: Using an "=" filter requires Query2's "Cross product allowed" property to be set to "Allow".
You need a join, not a filter.
Quote from: Cape Cod Gunny on 11 Feb 2022 10:36:18 AM
I'd like to understand the best way to restrict items in a query. For example Query1 returns a list of ID's based of specific detail filters. I would like Query2 to return only items where Query2.ID matches Query1.ID.
Which Query2 Detail Filter is better? And why?
Query2.ID IN ( Query1.ID )
Query2.ID = Query1.ID
Note: Using an "=" filter requires Query2's "Cross product allowed" property to be set to "Allow".
Hi,
I second Doug's approach. The best option is to join the two queries, with a mandatory cardinality (probably 1..1 <--> 1..1). This will be much more efficient than trying to use cross products.
Cheers!
MF.
Thank you both for your input.
Quote from: Cape Cod Gunny on 11 Feb 2022 11:51:16 AM
Thank you both for your input.
You're welcome! Let us know how it goes :-)
Cheers!
MF.