Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
who can help me to dissolve a synthetic key?
There are 5 tables (Equipment, Wartungsaufträge, Arbeitsvorbereitung, Werkskalender, Arbeitsplätze) related with each other tables.
The table Arbeitsplatz with key [Arbplatz] exists in the tables Equipment, Wartungsaufträge and Arbeitsvorbereitung. The work calendar has a key [KEY_Dat1] and the Arbeitsplätze a key [Arbplatz].
The result should be that in the table Arbeitsvorbereitung both keys [Arbplatz] / [KEY_Dat1] and Wartungsaufträge also the keys [Arbplatz] / [KEY_Dat1] exist. Unfortunately, I cannot dissolve the key.
In picture 2 shows how the connection should look.
Regards
Stefan
concatenate the two fields causing the sythetic key in both of the tables, then in one table remove the individual fields, so in table Arbeitsvorbereitung you have 3 fields:
'Concatenated field'
Arbplatz
KeyDAT1
and in the other table you just have the concatenated field
You just need to drop the ArbPlatz Field from the Wartungsauftraege table. Just add the following statement to the end of the script or see the attached .qvw-File.
DROP FIELD ArbPlatz FROM Wartungsauftraege;
Many thanks, but I need ArbPlatz in table Wartungsauftraege, so I have a relationship between Wartungsauftraege and Arbeitsplätze.
Try the attached...
Try creating a link table then :
WAAPLink:
LOAD DISTINCT
ArbPlatz & '|' & KEY_Dat1 AS keyLink,
ArbPlatz,
KEY_Dat1
Resident Wartungsauftraege;
Concatenate(WAAPLink)
LOAD DISTINCT
ArbPlatz & '|' & KEY_Dat1 AS keyLink,
ArbPlatz,
KEY_Dat1
Resident Arbeitsvorbereitung;
left join(Wartungsauftraege)
LOAD
ArbPlatz,
KEY_Dat1,
ArbPlatz & '|' & KEY_Dat1 AS keyLink
Resident Wartungsauftraege;
left join(Arbeitsvorbereitung)
LOAD
ArbPlatz,
KEY_Dat1,
ArbPlatz & '|' & KEY_Dat1 AS keyLink
Resident Arbeitsvorbereitung;
DROP FIELD KEY_Dat1, ArbPlatz FROM Arbeitsvorbereitung, Wartungsauftraege;