Project

General

Profile

Anomalie #2603

Updated by Emanuel Stancu 24 days ago

<pre><code class="sql"> 
 SELECT count(*)    from negociateurs n  
 WHERE n.nego_typenego = 1 -- 13695 en tout, pas dans mandats_nego ni util actifs 
 and n.nego_actif=0 -- 13576 inactifs 
 AND n.nego_id not in (select mn.com_idnego from mandats_nego mn where mn.com_idnego IS NOT NULL) 
  AND n.nego_id not in (select u.util_idnego from utilisateurs u where u.util_idnego IS NOT NULL AND u.util_actif=1) 
  AND n.nego_id not in (SELECT m.mdt_conseilleruvr FROM mandats m WHERE mdt_conseilleruvr IS NOT NULL) -- 13431 inactifs, pas dans mandats 
  AND n.nego_id not in (SELECT m.Lot_IdNego FROM Lots m WHERE Lot_IdNego IS NOT NULL) -- 13426 inactifs, pas dans mandats, ni lots 
  AND n.nego_id not in (SELECT m.ges_conseilleruvr FROM mandats_gestion m WHERE ges_conseilleruvr IS NOT NULL) -- 13270 inactifs, ni mandats gestion 
  AND n.nego_id not in (SELECT m.LGe_IdNego FROM LotGestions m WHERE LGe_IdNego IS NOT NULL) -- 13269 ni LotGestions 
  AND n.nego_id not in (SELECT m.Syn_IdNego FROM Syndic m WHERE Syn_IdNego IS NOT NULL) -- 13197 ni Syndic 
  AND n.nego_id not in (SELECT m.Vir_IdNego FROM Virements m WHERE Vir_IdNego IS NOT NULL) -- 13179 Virements 
  AND n.nego_id NOT IN (SELECT o.Ofr_IdNegociateurSortie FROM offres o WHERE Ofr_IdNegociateurSortie IS NOT NULL) -- 13070 ni dans offres 

 
 ; 
 </code></pre> 

Back