Skip to content

Commit

Permalink
only import codefi companies when creating a new campaign
Browse files Browse the repository at this point in the history
  • Loading branch information
cmarcoin authored and Joalien committed Jul 2, 2024
1 parent 1c9250f commit e79c2dd
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions pkg/ops/campaignops/sql/siretsFromListe.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
select siret
from v_summaries
where last_list=$1 and alert != 'Pas d''alerte'
and last_procol in ('in_bonis', 'continuation', 'sauvegarde', 'plan_sauvegarde')
and etat_administratif != 'F'
and first_alert;
SELECT vs.siret
FROM v_summaries vs
INNER JOIN codefi_entreprises ce ON vs.siren = ce.siren
WHERE vs.liste = $1
AND vs.alert != 'Pas d''alerte'
AND vs.last_procol IN ('in_bonis', 'continuation', 'sauvegarde', 'plan_sauvegarde')
AND vs.etat_administratif != 'F'
AND vs.first_alert;

0 comments on commit e79c2dd

Please sign in to comment.