1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
(SELECT ORDRE, Info, SENSIB_07, SENSIB_06, SENSIB_01, SENSIB_02, SENSIB_05
FROM sensib_synth
LEFT JOIN __sensib_synth_info ON sensib_synth.info = __sensib_synth_info.LIBELLE
WHERE 1
and cast(VALUATION_DATE as date) = '2006-12-06'
and KARBRE = 2
ORDER BY ORDRE ASC)
UNION ALL
(SELECT 99 AS ORDRE, KDEVISE, sum(SENSIB_07), sum(SENSIB_06), sum(SENSIB_01), sum(SENSIB_02), sum(SENSIB_05)
FROM sensib_book_cat
WHERE 1
and cast(VALUATION_DATE as date) = '2006-12-06'
and KARBRE = 2
GROUP BY KDEVISE
ORDER BY KDEVISE DESC); |
Partager