else 0 end) t_200487,sum(case when idelt=200489 then montant else 0 end)
t_200489,sum(case when idelt=200657 then montant else 0 end) t_200657,sum(case when
idelt=200674 then montant else 0 end) t_200674,sum(case when idelt=200676 then montant
else 0 end) t_200676,sum(case when idelt=201143 then montant else 0 end)
t_201143,sum(case when idelt=201225 then montant else 0 end) t_201225,sum(case when
idelt=201359 then montant else 0 end) t_201359,sum(case when idelt=403201 then montant
else 0 end) t_403201,sum(case when idelt=403210 then montant else 0 end)
t_403210,sum(case when idelt=403212 then montant else 0 end) t_403212,sum(case when
idelt=403301 then montant else 0 end) t_403301,sum(case when idelt=403310 then montant
else 0 end) t_403310,sum(case when idelt=403312 then montant else 0 end)
t_403312,sum(case when idelt=403361 then montant else 0 end) t_403361,sum(case when
idelt=403412 then montant else 0 end) t_403412,sum(case when idelt=403461 then montant
else 0 end) t_403461,sum(case when idelt=403501 then montant else 0 end)
t_403501,sum(case when idelt=403510 then montant else 0 end) t_403510,sum(case when
idelt=403512 then montant else 0 end) t_403512,sum(case when idelt=403610 then montant
else 0 end) t_403610,sum(case when idelt=403612 then montant else 0 end)
t_403612,sum(case when idelt=403710 then montant else 0 end) t_403710,sum(case when
idelt=403712 then montant else 0 end) t_403712,sum(case when idelt=403761 then montant
else 0 end) t_403761,sum(case when idelt=403801 then montant else 0 end)
t_403801,sum(case when idelt=403810 then montant else 0 end) t_403810,sum(case when
idelt=403812 then montant else 0 end) t_403812,sum(case when idelt=403861 then montant
else 0 end) t_403861,sum(case when idelt=404001 then montant else 0 end)
t_404001,sum(case when idelt=404010 then montant else 0 end) t_404010,sum(case when
idelt=404012 then montant else 0 end) t_404012,sum(case when idelt=404061 then montant
else 0 end) t_404061,sum(case when idelt=411050 then montant else 0 end)
t_411050,sum(case when idelt=411053 then montant else 0 end) t_411053,sum(case when
idelt=411058 then montant else 0 end) t_411058,sum(case when idelt=501110 then montant
else 0 end) t_501110,sum(case when idelt=501180 then montant else 0 end)
t_501180,sum(case when idelt=502110 then montant else 0 end) t_502110,sum(case when
idelt=554500 then montant else 0 end) t_554500 from jefy_poems.R4_all where mois = 02
and exercice = 2009 and R4_all.temps = 0 and R4_all.programme = 0150 and montant !=0
group by id_r4, exercice, mois, conex
Creation des structures pour la feuille 02 / Etape 3
SQL executé sur la base :
DROP TABLE R4_XLS_0150_02_2009_02
Creation des structures pour la feuille 02 / Etape 4
SQL executé sur la base :
CREATE TABLE R4_XLS_0150_02_2009_02 as select id_r4, exercice, mois, conex
,t_101000,t_101070,t_102000,t_104000,t_101000+t_101070+t_102000+t_104000 TOTAL_1
,t_200221,t_200286,t_200221+t_200286 TOTAL_2
,t_200108,t_200172,t_200222,t_200407,t_200440,t_200487,t_200489,t_200657,t_200674,t_2
00676,t_201143,t_201225,t_201359,t_200108+t_200172+t_200222+t_200407+t_200440+t_
200487+t_200489+t_200657+t_200674+t_200676+t_201143+t_201225+t_201359
TOTAL_3
,t_403201,t_403210,t_403212,t_403301,t_403310,t_403312,t_403361,t_403412,t_403461,t_4
03501,t_403510,t_403512,t_403610,t_403612,t_403710,t_403712,t_403761,t_403801,t_4038