 select elu.nom as nom, prenom, adresse, elu.cp as cpelu, elu.ville as villeelu, affectation.scrutin,
scrutin.libelle as libellescrutin, 
to_char(date_scrutin ,'DD/MM/YYYY') as date_scrutin, scrutin.convocation_president,
scrutin.convocation_president, poste,
affectation.bureau, bureau.libelle as libellebureau, bureau.bureau,candidat.nom as candidat
from  &DB_PREFIXEelu inner join  &DB_PREFIXEaffectation on elu.elu = affectation.elu  
inner join  &DB_PREFIXEscrutin on affectation.scrutin=scrutin.scrutin
left join  &DB_PREFIXEbureau on bureau.bureau = affectation.bureau
left join &DB_PREFIXEcandidat on candidat.candidat = affectation.candidat
where 
affectation.affectation='&idx'
order by bureau.bureau