
SELECT
  ('numero '||COALESCE(travaux,'0')||' '||COALESCE(entreprise.nomentreprise,'')) as travaux,
  naturetravaux,
  to_char(datedebinter,'DD/MM/YYYY') as dates

FROM
  &DB_PREFIXEtravaux_archive
  LEFT JOIN &DB_PREFIXEentreprise on travaux_archive.entreprise=entreprise.entreprise

WHERE
  travaux_archive.emplacement=&idx
;
