Databases Reference
In-Depth Information
CONCATENATE ([Aircrafts])
LOAD DISTINCT
[%Aircraft Type ID],
'Unknown: ' & [%Aircraft Type ID] as [Aircraft Name],
'Unknown' as [Aircraft
Group],
'UNKNOWN' as
[Manufacturer],
'???' as
[Aircraft Short Name]
RESIDENT Flights
WHERE NOT Exists(Temp_Aircraft_Type_ID, [%Aircraft Type ID]);
DROP TABLE Temp_Aircraft_Type_ID; // Clean up temporary table
3.
Save and reload the document.
Here's what the added script does:
1.
It copies all of the %Aircraft Type ID values from the Aircrafts
dimension table into a separate, temporary field called Temp_Aircraft_
Type_ID .
° This separate field is necessary as we want to compare the Aircraft
Type ID values from the Flights table against only the Aircraft
Type ID values that exist in the Aircrafts table.
2.
We append a dummy table segment to the Aircrafts table by using the
WHERE NOT Exists(Temp_Aircraft_Type_ID, [%Aircraft Type ID])
clause. This helps us load the missing aircrafts from the Flights table while
also ruling out all aircrafts that are already stored in the original Aircrafts
table, thus avoiding duplicates.
3.
At the same time, for each of the missing ID's, a dummy record is created
with (a variant of) the Unknown value for each corresponding attribute.
 
Search WWH ::




Custom Search