 select inscription,concat(substring(date_inscription,9,2),'/',substring(date_inscription,6,2),'/',substring(date_inscription,1,4)) as date_inscription, liste, nom, prenoms, nom_usage, sexe,concat( substring( naissance_date, 9, 2 ) , '/', substring( naissance_date, 6, 2 ) , '/', substring( naissance_date, 1, 4 ) ) AS naissance_date, naissance_ville, naissance_ville_cp, naissance_ville_insee,
  pays.libelle as naissance_pays, naissance_ville_etr, pere_nom, pere_prenoms, concat( substring( pere_naissance_date, 9, 2 ) , '-', substring(pere_naissance_date, 6, 2 ) , '-', substring(pere_naissance_date, 1, 4 ) ) AS pere_naissance_date, pere_naissance_pays, pere_naissance_ville, pere_naissance_ville_cp, pere_naissance_ville_insee, pere_naissance_ville_etr,
  pn.libelle as pere_nationalite, mere_nom, mere_prenoms, concat( substring( mere_naissance_date, 9, 2 ) , '-', substring(mere_naissance_date, 6, 2 ) , '-', substring(mere_naissance_date, 1, 4 ) ) AS mere_naissance_date, mere_naissance_pays, mere_naissance_ville, mere_naissance_ville_cp, mere_naissance_ville_insee, mere_naissance_ville_etr, mere_nationalite, nationalite2, convention_international, domicile_adr1, domicile_adr2, domicile_adr3, domicile_ville, domicile_ville_cp, domicile_ville_insee, domicile_pays, domicile_ville_etr, residence_adr1, residence_adr2, residence_adr3, residence_ville, residence_ville_cp, residence_ville_insee, residence_pays, residence_ville_etr, fratrie, situation_familiale, enfants, pupille, situation_scolaire, diplome, specialite, profession, exemption, transmission
 from inscription 
  left JOIN pays ON inscription.naissance_pays = pays.pays 
  left JOIN pays pn ON inscription.pere_nationalite= pn.pays
  where inscription.inscription='&idx'