I am trying to create an auxiliary table from two other tables with an "IntervalMatch" serving as connecting rule. But once I join those two tables I cannot dump its contents inside a third table (since I cannot use two "Resident" tables), so I tried to load the other fields from the "Resident" table in the "Inner Join IntervalMatch" but it generates a cartesian product.
Which would be the best way to generate this third table keeping the interval match logic?
// Loading columns from "SalesOrderHeader"
SalesOrderID as Special.SaleID,
[OrderDate] as Special.OrderDate,
[TerritoryID] as Special.TerritoryID1,
[OnlineOrderFlag] as Special.Online
// Loading columns from "SalesTerritoryHistory"
[TerritoryID] as Special.TerritoryID,
[BusinessEntityID-EmployeeBusinessEntityID] as Special.SalespersonID,
[SalesTerritoryHistory.StartDate] as Special.StartDate,