How do I exclude/delete records in a fact table based on a value in another table?
Desired Output in Fact Table:
After loading the Fact table, I would like to delete records that have certain OrderStatus that are in 'DeleteOrderStatus' table. Using KEEP/INNER JOIN, I was able to include certain records. Is there a way I can exclude certain records based on another table?
Is there any reason why the field name in the filter was changed? The reason I am asking is when I tried to use the same field name twice as below, the filter did not work properly. Could you please explain why the below ocde does not work?
instead of the two argument version, you won't get all requested records if OrderStatus is not a primary key (which I assume it is not).
In other words, as soon as your LOAD encountered the first record with OrderStatus FIRM, FIRM is part of the symbols that the exists() function checks the upcoming record values against. Hence, no other records with OrderStatus FIRM will pass the WHERE clause and will be loaded to the resident output table.
I guess that's what you see when you are mentioning that this approach 'will not work properly', right?