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
| SELECT p1.p_texte AS Phrase_a_traduire,
l1.l_nom AS Langue_a_traduire,
l2.l_nom AS Traduction_en_langue,
p2.p_texte AS Phrase_traduite
FROM Phrase AS p1
INNER JOIN Langue AS l1 ON p1.p_id_langue = l1.l_id
LEFT OUTER JOIN Traduire AS t ON p1.p_id = t.tr_id_phrase1
LEFT OUTER JOIN Phrase AS p2 ON t.tr_id_phrase2 = p2.p_id
INNER JOIN Langue AS l2 ON p2.p_id_langue = l2.l_id
WHERE p1.p_texte = 'Bonjour'
AND l1.l_nom = 'Français'
UNION
SELECT p1.p_texte AS Phrase_a_traduire,
l1.l_nom AS Langue_a_traduire,
l2.l_nom AS Traduction_en_langue,
p2.p_texte AS Phrase_traduite
FROM Phrase AS p1
INNER JOIN Langue AS l1 ON p1.p_id_langue = l1.l_id
LEFT OUTER JOIN Traduire AS t ON p1.p_id = t.tr_id_phrase2
LEFT OUTER JOIN Phrase AS p2 ON t.tr_id_phrase1 = p2.p_id
INNER JOIN Langue AS l2 ON p2.p_id_langue = l2.l_id
WHERE p1.p_texte = 'Bonjour'
AND l1.l_nom = 'Français' |
Partager