select * from imp_log where imp_log_applicatie = 'SOAP'
and imp_log_status = 'E' order by imp_log_datum DESC

select * from imp_log where imp_log_applicatie = 'SOAP'
and imp_log_omschrijving like '%[45337]%' order by imp_log_datum DESC


select * from imp_log where imp_log_applicatie = 'SOAP'
and imp_log_omschrijving like '%INSERT%' order by imp_log_datum DESC

select * from prs_perslid where prs_perslid_oslogin = 'JMAAS1'  -- IAM-1394087

select * from mld_melding

select * from prs_perslid

select * from aaes_imp_soap_perslid

select * from aaes_imp_soap_perslid i, prs_perslid p
where i.loginnaam = p.prs_perslid_oslogin

update prs_perslid p set prs_perslid_authenticatie = (select id from aaes_imp_soap_perslid i where i.loginnaam = p.prs_perslid_oslogin)

select loginnaam from aaes_imp_soap_perslid group by loginnaam having count(loginnaam) > 1

delete aaes_imp_soap_perslid where email like '%.nl' or email like '%.com'

delete aaes_imp_soap_perslid where email is null
and loginnaam in (select loginnaam from aaes_imp_soap_perslid group by loginnaam having count(loginnaam) > 1)

select * from aaes_imp_soap_perslid where loginnaam = 'RSAH'

select * from aaes_imp_soap_perslid where email is null

select * from prs_perslid where not  exists
(select id from aaes_imp_soap_perslid where id = coalesce(prs_perslid_authenticatie, 'blabla')
 )
 
   and prs_perslid_authenticatie is not null
   
   
   update prs_perslid set prs_perslid_verwijder = sysdate
    where prs_perslid_authenticatie is null
   and prs_perslid_nr is not null