update profil_cs_param_bio p1
set pcp_ordre=pcp_ordre+1
where pcp_ordre > (
select max(p2.pcp_ordre) from (select pbi_code, prc_code, pcp_ordre from profil_cs_param_bio where pbi_code=88) as p2 where p2.prc_code=p1.prc_code);


insert into profil_cs_param_bio(pbi_code, prc_code, pcp_ordre) select 95, prc_code, pcp_ordre+1 from profil_cs_param_bio where pbi_code=88;

delete FROM `profil_cs_param_bio` where pbi_code in (93, 94, 96,97);

insert into profil_cs_param_bio (pbi_code, prc_code, pcp_ordre) select 93, 3, max(pcp_ordre)+1 from profil_cs_param_bio where prc_code=3;
insert into profil_cs_param_bio (pbi_code, prc_code, pcp_ordre) select 94, 3, max(pcp_ordre)+1 from profil_cs_param_bio where prc_code=3;
insert into profil_cs_param_bio (pbi_code, prc_code, pcp_ordre) select 96, 3, max(pcp_ordre)+1 from profil_cs_param_bio where prc_code=3;
insert into profil_cs_param_bio (pbi_code, prc_code, pcp_ordre) select 97, 3, max(pcp_ordre)+1 from profil_cs_param_bio where prc_code=3;

insert into profil_cs_param_bio (pbi_code, prc_code, pcp_ordre) select 93, 7, max(pcp_ordre)+1 from profil_cs_param_bio where prc_code=7;
insert into profil_cs_param_bio (pbi_code, prc_code, pcp_ordre) select 94, 7, max(pcp_ordre)+1 from profil_cs_param_bio where prc_code=7;
insert into profil_cs_param_bio (pbi_code, prc_code, pcp_ordre) select 96, 7, max(pcp_ordre)+1 from profil_cs_param_bio where prc_code=7;
insert into profil_cs_param_bio (pbi_code, prc_code, pcp_ordre) select 97, 7, max(pcp_ordre)+1 from profil_cs_param_bio where prc_code=7;

delete FROM `profil_cs_param_bio` where pbi_code in (98,99,100,69,70,71,82);

insert into profil_cs_param_bio (pbi_code, prc_code, pcp_ordre) select 69, 5, max(pcp_ordre)+1 from profil_cs_param_bio where prc_code=5;
insert into profil_cs_param_bio (pbi_code, prc_code, pcp_ordre) select 70, 5, max(pcp_ordre)+1 from profil_cs_param_bio where prc_code=5;
insert into profil_cs_param_bio (pbi_code, prc_code, pcp_ordre) select 71, 5, max(pcp_ordre)+1 from profil_cs_param_bio where prc_code=5;
insert into profil_cs_param_bio (pbi_code, prc_code, pcp_ordre) select 82, 5, max(pcp_ordre)+1 from profil_cs_param_bio where prc_code=5;
insert into profil_cs_param_bio (pbi_code, prc_code, pcp_ordre) select 98, 5, max(pcp_ordre)+1 from profil_cs_param_bio where prc_code=5;
insert into profil_cs_param_bio (pbi_code, prc_code, pcp_ordre) select 99, 5, max(pcp_ordre)+1 from profil_cs_param_bio where prc_code=5;
insert into profil_cs_param_bio (pbi_code, prc_code, pcp_ordre) select 100, 5, max(pcp_ordre)+1 from profil_cs_param_bio where prc_code=5;

insert into profil_cs_param_bio (pbi_code, prc_code, pcp_ordre) select 69, 7, max(pcp_ordre)+1 from profil_cs_param_bio where prc_code=7;
insert into profil_cs_param_bio (pbi_code, prc_code, pcp_ordre) select 70, 7, max(pcp_ordre)+1 from profil_cs_param_bio where prc_code=7;
insert into profil_cs_param_bio (pbi_code, prc_code, pcp_ordre) select 71, 7, max(pcp_ordre)+1 from profil_cs_param_bio where prc_code=7;
insert into profil_cs_param_bio (pbi_code, prc_code, pcp_ordre) select 82, 7, max(pcp_ordre)+1 from profil_cs_param_bio where prc_code=7;
insert into profil_cs_param_bio (pbi_code, prc_code, pcp_ordre) select 98, 7, max(pcp_ordre)+1 from profil_cs_param_bio where prc_code=7;
insert into profil_cs_param_bio (pbi_code, prc_code, pcp_ordre) select 99, 7, max(pcp_ordre)+1 from profil_cs_param_bio where prc_code=7;
insert into profil_cs_param_bio (pbi_code, prc_code, pcp_ordre) select 100, 7, max(pcp_ordre)+1 from profil_cs_param_bio where prc_code=7;