-- ACTE ABSENT
SELECT DISTINCT codeActe FROM p_demandeautorisation
WHERE codeActe NOT IN (
SELECT codeActe FROM p_acte)


SELECT  fn_garantie_acte(codeActe),codeGarantie FROM p_prestationactes
WHERE codeGarantie=""


UPDATE p_prestationactes
SET codeGarantie=fn_garantie_acte(codeActe) 
WHERE codeGarantie=""

``
-- 1-- RECHERCHER DU BO ACTE

SELECT * FROM p_acte
WHERE codeActe='LB537'

SELECT * FROM a_acte
WHERE libelle LIKE '%ORTHOPHONIQUE%'

SELECT * FROM p_acte
WHERE libelle LIKE '%NATAL%'

SELECT * FROM p_detailtarifactepoliceprestataire
WHERE codeActe IN ('ECO','AC0000053','AC0000490')

-- 3 -- mise a jour de l'acte   AC0000511
UPDATE a_acte SET codeActe='AC0000044' WHERE codeActe='AC0000328';

UPDATE p_prestationactes SET codeActe='AC0000044' WHERE codeActe='AC0000328'; 

UPDATE p_demandeautorisation SET codeActe='AC0000044' WHERE codeActe='AC0000328';

UPDATE p_demandeententeprealable SET codeActe='AC0000044' WHERE codeActe='AC0000328';

UPDATE p_demandeententeprealableopt SET codeActe='AC0000044' WHERE codeActe='AC0000328';

UPDATE p_demandepec SET codeActe='AC0000044' WHERE codeActe='AC0000328';

UPDATE p_detailexamen SET codeActe='AC0000044' WHERE codeActe='AC0000328';

UPDATE p_detailmiseenobservation SET codeActe='AC0000044' WHERE codeActe='AC0000328';

UPDATE p_detailoptique SET codeActe='AC0000044' WHERE codeActe='AC0000328';

UPDATE p_prescriptionseance SET codeActe='AC0000044' WHERE codeActe='AC0000328';

UPDATE p_prestationexamens SET codeActe='AC0000044' WHERE codeActe='AC0000328';

UPDATE p_prestationoptiques SET codeActe='AC0000044' WHERE codeActe='AC0000328';

UPDATE p_prestationseances SET codeActe='AC0000044' WHERE codeActe='AC0000328';

UPDATE p_sousacte SET codeActe='AC0000044' WHERE codeActe='AC0000328';

UPDATE p_sousactebase SET codeActe='AC0000044' WHERE codeActe='AC0000328';

UPDATE p_prestationacteshospitalisation SET codeActe='AC0000044' WHERE codeActe='AC0000328';

UPDATE p_detailmiseenobservation SET codeActe='AC0000044' WHERE codeActe='AC0000328';

UPDATE tarifacte SET codeActe='AC0000044' WHERE codeActe='AC0000328';

UPDATE tarifgroupeprestataire SET codeActe='AC0000044' WHERE codeActe='AC0000328';

UPDATE tarifprestataire SET codeActe='AC0000044' WHERE codeActe='AC0000328';

UPDATE p_detailtarifactepolice SET codeActe='AC0000044' WHERE codeActe='AC0000328';

UPDATE p_detailtarifactepoliceprestataire SET codeActe='AC0000044' WHERE codeActe='AC0000328';

UPDATE p_detailtarifacte SET codeActe='AC0000044' WHERE codeActe='AC0000328';

UPDATE p_detailtarifacteprestataire SET codeActe='AC0000044' WHERE codeActe='AC0000328';

UPDATE p_detailtarifacte SET codeActe='AC0000044' WHERE codeActe='AC0000328';

UPDATE p_detailtarifacteprestataire SET codeActe='AC0000044' WHERE codeActe='AC0000328';

UPDATE actesbaremepriseencharge SET codeActe='AC0000044' WHERE codeActe='AC0000328';



SELECT * FROM actesbaremepriseencharge
WHERE codeActe='AC0000490'