//Le source INSEE n'existe pas encore, donc on migre tout ce qui est source OSE vers source INSEE
$bdd->exec("UPDATE employeur SET source_id = $idSource");
}else{
$idSource=$haveAlreadyInseeSource['ID'];
}
//$haveAlreadySiret = $bdd->select("SELECT siret FROM employeur e WHERE siret IS NOT null FETCH FIRST 5 ROWS ONLY", [], ['fetch' => $bdd::FETCH_ONE]);
$haveAlreadySiret=$bdd->select("SELECT siret FROM (SELECT siret, rownum AS rn FROM employeur e WHERE siret IS NOT NULL) e WHERE e.rn < 10",[],['fetch'=>$bdd::FETCH_ONE]);
$haveAlreadyEmployeur=$bdd->select("SELECT * FROM employeur e");
$options['where']='SIREN LIKE \''.$num.'%\' AND SOURCE_ID = (SELECT id FROM source WHERE code = \'OSE\') AND SIREN NOT IN (\'999999999\', \'000000000000\')';
$options['soft-delete']=false;
$options['where']='SIREN LIKE \''.$num.'%\' AND SOURCE_ID = (SELECT id FROM source WHERE code = \'INSEE\') AND SIREN NOT IN (\'999999999\', \'000000000000\')';
$options['delete']=false;
}
$i++;
@@ -135,13 +157,14 @@ foreach ($listFiles as $file) {