The 'Replace' prefix just drops the table and generates a new table. This is not necessary. I got into the habit of using it to be sure that I am not appending the data to previous data in a table with the same name in the application. The use of Replace is not relevant for implementation of 'IntervalMatch'.
Thanks for your help. I'm a newbie, but I'm learning a lot.
If I want to use a composite key in the Key table and embed the composite key in the Transaction table, is the attached correct? I believe I'm substituting the composite key for the combination of the Department and TDate based on the interval match and then dropping Department from Transaction. If this is correct, is this the most concise way to do this?
The results seem to be correct and the model seems easier to read than than allowing a synthetic key table.
I don't get why I need to include all the fields from the Key table in the left join then drop them. Can you tell why this is necessary?