J'ai un problème en SQL. Mon SGBD est Oracle v8. Je vous expose mon problème.
Il implique trois tables : EXCHANGE, COUNTRY_CODE et COUNTRY_LABEL.
Voici les champs impliqués dans chaque table :
EXCHANGE :
---------------
COUNTRY_CODE
COUNTRY_CODE :
---------------------
COUNTRY_ID
CODE
COUNTRY_LABEL :
---------------------
COUNTRY_ID
LABEL
Sachant que l'on part du champ EXCHANGE.COUNTRY_CODE, comment faire pour extraire le champ COUNTRY_LABEL.LABEL ?
Je précise que le champ COUNTRY_CODE.CODE est identique à celui EXCHANGE.COUNTRY_CODE donc on va jointurer là-dessus ^^ Idem entre les deux champs COUNTRY_CODE.COUNTRY_ID et COUNTRY_LABEL.COUNTRY_ID.
Je débute en SQL donc j'espère que vous me comprendrez !!
J'ai tenté ceci :
select e.COUNTRY_CODE, cl.LABEL
from EXCHANGE e
LEFT OUTER JOIN COUNTRY_LABEL cl ON (cl.COUNTRY_ID = COUNTRY_CODE.COUNTRY_ID and e.COUNTRY_CODE = COUNTRY_CODE.CODE)
Mais Oracle me répond : SQL exception : ORA-00904: "COUNTRY_CODE"."CODE": invalid identifier
D'avance merci pour votre aide