1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
| select X.MATRIC, Y.*
from xmltable('/DocPaye/Agent'
passing xmlparse (content'
<DocPaye>
<Annee V="2014"/>
<Mois V="--03--"/>
<CodeEh V="19081"/>
<Agent origine="paie">
<Matricule V="000000"/>
<PrecompteObligatoire>
<Type V="VCN"/>
<Nature V="OUV"/>
<Reliquat V="3600,61"/>
<ValIni V="4698,01"/>
<Montant V="109,74"/>
</PrecompteObligatoire>
</Agent>
<Agent origine="paie">
<Matricule V="000001"/>
<PrecompteObligatoire>
<Type V="SAR"/>
<Nature V="PRC"/>
<Reliquat V="5200,97"/>
<ValIni V="6507,28"/>
<Montant V="187,03"/>
</PrecompteObligatoire>
</Agent>
<Agent origine="paie">
<Matricule V="000002"/>
<PrecompteObligatoire>
<Type V="VCN"/>
<Nature V="OUV"/>
<Reliquat V="543,15"/>
<ValIni V="5822,67"/>
<Montant V="128,91"/>
</PrecompteObligatoire>
</Agent>
<Agent origine="paie">
<Matricule V="000003"/>
<PrecompteObligatoire>
<Type V="SAR"/>
<Nature V="PRC"/>
<Reliquat V="1038,85"/>
<ValIni V="1259"/>
<Montant V="95,84"/>
</PrecompteObligatoire>
</Agent>
<Agent origine="paie">
<Matricule V="000004"/>
<PrecompteObligatoire>
<Type V="SAR"/>
<Nature V="ALM"/>
<Reliquat V="0"/>
<ValIni V="179,16"/>
<Montant V="179,16"/>
</PrecompteObligatoire>
<PrecompteObligatoire>
<Type V="SAR"/>
<Nature V="PRC"/>
<Reliquat V="7786,96"/>
<ValIni V="19245,88"/>
<Montant V="136,64"/>
</PrecompteObligatoire>
</Agent>
</DocPaye>')
columns MATRIC char(6) path './Matricule/@V', PRECOMPTE xmltype path './PrecompteObligatoire') X
,xmltable('/PrecompteObligatoire' passing X.PRECOMPTE
columns PHTYPE char(3) path './Type/@V',
nature char(3) path 'Nature/@V',
valini char(10) path 'ValIni/@V',
reliquat number(18,2) path 'Reliquat/@V',
montant number(18,2) path 'Montant/@V') (+) Y; |
Partager