
SELECT
  (titre||' '||nom||' '||prenom||' '||marital) as nom,
  to_char(datenaissance,'DD/MM/YYYY') as datenaissance,
  adresse1,
  adresse2,
  CP,
  ville,
  telephone,
  dcd,
  parente,
  autorisation_archive.observation,
  (emplacement_archive.famille||'  n° :  '||emplacement_archive.emplacement) as emplacement,
  numeroacte, 
  to_char(datevente,'DD/MM/YYYY') as datevente,
  to_char(dateterme,'DD/MM/YYYY') as dateterme,
  duree,
  terme

FROM
  &DB_PREFIXEautorisation_archive
  LEFT JOIN &DB_PREFIXEemplacement_archive on emplacement_archive.emplacement=autorisation_archive.emplacement

WHERE
  autorisation = &idx
;