/*ajout enreg de paramétrage de UUID*/
insert into  <PREFIXE_HA>PARAMDICO  (TYPEDICO,ID1,ID2,ID3,NUM1 )
select 'OXAETL','UUID_CS',COD_TAB,cast(NUM_FIX as varchar),NUM_FIX from <PREFIXE_HA>CS_CHPS where  TYPE='UUID' 
and  'OXAETL'+'UUID_CS'+COD_TAB+cast(NUM_FIX as varchar) not in (select TYPEDICO+ID1+ID2+ID3 from <PREFIXE_HA>PARAMDICO)
<SEPARATEUR>
/*On rentre les info, NUM1=NUM_FIX, NUM2= taille de la 1ere clé,NUM3=longueur de la clé 2 si existe*/
update <PREFIXE_HA>PARAMDICO set ALPHA1='NO_CDE',NUM2=9,ALPHA5='NUM' where TYPEDICO='OXAETL' and ID1='UUID_CS' and ID2='CA_ENTET'
update <PREFIXE_HA>PARAMDICO set ALPHA1='NO_CDE',ALPHA2='NO_PO',NUM2=9,NUM3=3,ALPHA5='NUM' where TYPEDICO='OXAETL' and ID1='UUID_CS' and ID2='CA_LIGNE'
update <PREFIXE_HA>PARAMDICO set ALPHA1='CODE_STE',ALPHA2='CODE_SI',NUM2=7,NUM3=14 where TYPEDICO='OXAETL' and ID1='UUID_CS' and ID2='SECTIMPU'
<SEPARATEUR>
/*SECTIMPU Sectorisé ?*/
update t set ALPHA6=LIB01PARV
from <PREFIXE_HA>PARAMDICO t,<PREFIXE_HA>PARAVRAC p
where TYPEPARV='PARAMSTE' and CODEPARV='SISECTOR'
and t.TYPEDICO='OXAETL' and ID1='UUID_CS' and ID2='SECTIMPU'
/*Correction paramétrage des CS dans PARAMDICO*/
update <PREFIXE_HA>PARAMDICO set ALPHA1='PAYS' where TYPEDICO='OXAETL' and ID1='PAR_CS' and ID2='COUNTRY'
update <PREFIXE_HA>PARAMDICO set ALPHA1='UTILISATEURS' where TYPEDICO='OXAETL' and ID1='PAR_CS' and ID2='HASTUTIL'


