CREATE OR REPLACE VIEW vu_s_cadastre18_mf_acquisitions AS 
 SELECT s_cadastre18.gid, s_cadastre18.numparc, s_cadastre18.section, s_cadastre18.insee, s_cadastre18.idparc, s_cadastre18.codsite, s_cadastre18.the_geom, mf_acquis.num_access, mf_acquis.cleparc, mf_acquis.code_insee, mf_acquis.numr_parcelle, mf_acquis.lieu_dit, mf_acquis.surface, mf_acquis.code_site, mf_acquis.projet_acquisition, mf_acquis.historisation, mf_acquis.code_acte, mf_acquis.natr_acte, mf_acquis.date_acte, mf_acquis.nom_notaire, mf_acquis.maitrise_fonciere, mf_acquis.prix_acquisition, mf_acquis.origine_propriete, mf_acquis.duree_conv, mf_acquis.echeance_prevue
   FROM s_cadastre18, ( SELECT mf_generale.num_access, mf_generale.cleparc, mf_generale.code_insee, mf_generale.numr_parcelle, mf_generale.lieu_dit, mf_generale.surface, mf_generale.code_site, mf_generale.projet_acquisition, mf_generale.historisation, mf_acte_acquis.code_acte, mf_acte_acquis.natr_acte, mf_acte_acquis.date_acte, mf_acte_acquis.nom_notaire, mf_acte_acquis.maitrise_fonciere, mf_acte_acquis.prix_acquisition, mf_acte_acquis.origine_propriete, mf_acte_acquis.duree_conv, mf_acte_acquis.echeance_prevue
           FROM mf_generale, ( SELECT mf_acte.code_acte, mf_acte.natr_acte, mf_acte.date_acte, mf_acte.nom_notaire, mf_acte.maitrise_fonciere, mf_acte.prix_acquisition, mf_acte.origine_propriete, mf_acte.duree_conv, mf_acte.echeance_prevue
                   FROM mf_acte
                  WHERE mf_acte.maitrise_fonciere::text = 'Acquisition'::text) mf_acte_acquis
          WHERE mf_generale.code_acte::text = mf_acte_acquis.code_acte::text) mf_acquis
  WHERE s_cadastre18.idparc = mf_acquis.cleparc::text;

ALTER TABLE vu_s_cadastre18_mf_acquisitions OWNER TO postgres;
