Hello,
I am combining entries from 2 queries in a filter for a 3rd query. Essentially, Query1 and Query2 grab IDs from disparate sources and I would like to filter on these only once. Right now I have this, and it works if I allow for cross joins, but I am not sure if duplicates are retained:
[SQL3].[ID] IN ([Query1].[ID], [Query2].[ID])
Is there a function to subset distinct from this: ([Query1].[ID], [Query2].[ID])
I have tried coalesce, distinct, unique ... each throws a parsing error.
I am basically trying to make the query run faster and don't want it to look for the same data multiple times.
Why don't you solve this in your data warehouse?