Commit 0b1f4f0e authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Script SQL oublié pour la v13.3.0

parent 37a4d4d5
Loading
Loading
Loading
Loading
+28 −0
Changes for doc/release-notes/v13/13.3.0/02_divers.sql: 28 added lines, 0 removed lines.
Original line number Diff line number Diff line
--
-- 1. Générer les requêtes :
--

select 'update admission_financement set financement_id = '||of2.id||' where id = '||f.id||'; -- anc '||f.financement_id/*,
       f.id,
       of.id, of.source_id, of.code, of.libelle_long,
       of2.id, of2.code, of2.libelle_long*/
from admission_financement f
         join origine_financement of on f.financement_id = of.id
         join origine_financement of2 on of2.code = of.code and of2.source_id = 1
where of.id <> of2.id;
;

select 'update financement set origine_financement_id = '||of2.id||' where id = '||f.id||'; -- anc '||f.origine_financement_id/*,
       f.id,
       of.id, of.source_id, of.code, of.libelle_long,
       of2.id, of2.code, of2.libelle_long*/
from financement f
         join these t on f.these_id = t.id
         join origine_financement of on f.origine_financement_id = of.id
         join origine_financement of2 on of2.code = of.code and of2.source_id = 1
where t.source_id = 1 and
    of.id <> of2.id;

--
-- 2. Lancer les requêtes générées.
--
 No newline at end of file