
SELECT
  (COALESCE(nom,'') || ' ' || COALESCE(prenom,'')) as ayantdroit,
  (COALESCE(adresse1,'') || ' ' || COALESCE(cp,'') || ' ' || COALESCE(ville,'')) as adresse,
  to_char(datenaissance,'DD/MM/YYYY') as datenaissance

FROM
  &DB_PREFIXEautorisation_archive

WHERE
  emplacement=&idx
  AND nature='ayantdroit'
;
