0
I needed to make a query that I return in a row the data of a candidate plus the courses to which I applied, and this data is in a relational table 'tblcandidatoCurso'. After some research I tried to use FULL JOIN, but I always feel error.
Follow the query I made
SELECT DISTINCT can.idCandidato, cur.idCurso, cur1.idCurso, cur2.idCurso
FROM
tblcandidatura AS can
INNER JOIN tblcandidatocurso AS cur ON cur.idCandidato = can.idCandidato
FULL JOIN tblcandidatocurso AS cur1 ON cur1.idCandidato = can.idCandidato
FULL JOIN tblcandidatocurso AS cur2 ON cur2.idCandidato = can.idCandidato
WHERE cur.ordem = 0
AND cur1. ordem = 1
AND cur2.ordem = 2
where is the "tblcandidatura " ?
– Fleuquer Lima
If the relationship is between the same tables you do in the same JOIN. In your example you are creating 3 JOINS to relate the same tables.
– Fleuquer Lima