I'm having a issue with something I'm doing and want to double check with you the right way to do it.
I have several order tables (2010 to 2015; files Orders_2010.qvd, Orders_2011.qvd...), the orders have CodDiagnostico and CodPrestacion fields. I must filter the orders by some CodDiagnostico and CodPrestacion previously loaded in inline tables (let's say I want orders with CodDiagnostico IN (5,3,2) and CodPrestacion IN (1,4,6) ).
What I'm doing is:
1. Loading inline tables that have the values I want to filter in full order table (concatenation of different years)
2. I have this LOAD sentence
[Fecha emisión] as [Fecha cohorte],
FROM Orders_*.qvd (qvd)
What I'm having back is almost the same result as concatenating all the orders years without doing any filter with the exists. Why I think is that maybe with the * the Exists isn't performed until all the years are loaded and thus almost all the CodDiagnostico and CodPrestacion does Exists and only a few are filtered.
Am I right? what's the best way to do it?, a LOAD changing CodDiagnostico and CodPrestacion names and then make a RESIDENT LOAD?