1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
| Personne:
LOAD * INLINE [
Personne, Age
Lucas, 1
Kevina, 10
Tim, 12
Jean, 25
Pierre, 35
Raoul, 70
Huguette, 75
];
Catégorie:
LOAD * INLINE [
Catégorie, Début, Fin
Bébé, , 5
Enfant, 6, 18
Adulte, 19, 65
Senior, 66,
];
// On fait le lien entre les 2 tables :
IntervalMatch_table:
IntervalMatch (Age)
LOAD Début, Fin RESIDENT Catégorie;
// Optionnel : On rapporte les infos dans la table "Personnes" pour supprimer les clés de synthèse.
LEFT JOIN (Personne)
LOAD
Age, // Clé avec "Personne"
Début AS Début_TMP, // servira de clé
Fin AS Fin_TMP // servira de clé
RESIDENT IntervalMatch_table;
DROP TABLE IntervalMatch_table;
LEFT JOIN (Personne)
LOAD
Catégorie,
Début AS Début_TMP, // Clé avec "Personne"
Fin AS Fin_TMP // Clé avec "Personne"
RESIDENT Catégorie;
DROP FIELDS Début_TMP, Fin_TMP; |
Partager