UPDATE AS_COTIZACIONES SET PRO_ID='25218' WHERE EmpID = 2 and PRO_ID ='23534';

UPDATE AS_COTIZACIONES ac
JOIN polizas p ON p.PolNumID = ac.POL_ID
SET ac.PRO_ID = p.tipsegID
WHERE p.EmpID = 2 
  AND ac.EmpID = 2 
  AND ac.PRO_ID IN ('23718','23762','22824','23626','1100000001');

DELETE FROM AS_CAPITALES
WHERE COT_ID in (SELECT COT_ID FROM AS_COTIZACIONES 
WHERE EmpID = 2 and POL_ID is null AND PRO_ID in ('23718','23762','22824','23626','1100000001'));


DELETE FROM AS_COTIZACIONES 
WHERE EmpID = 2 and POL_ID is null AND PRO_ID in ('23718','23762','22824','23626','1100000001');