Les scripts utiles
Révision datée du 27 février 2016 à 18:31 par Bruno (discussion | contributions)
Cette page rassemble différents scripts et morceaux de code dont on ne sait pas trop quoi faire mais qui pourraient servir à d'autres.
Scripts
Query SQL pour le summary financier dans le SI SCANI
select valid_from, valid_until, dbegin_may, dend_may, (dend_may - dbegin_may + 1) as nb_days_may, value_day, nb_days, value_day * (dend_may - dbegin_may + 1) as value_may from (select valid_from, valid_until, greatest(valid_from, '2016-05-01') as dbegin_may, least(valid_until, '2016-05-31') as dend_may, price, price / (valid_until - valid_from) as value_day, valid_until - valid_from as nb_days from invoices_elts where valid_until >= '2016-05-01' and valid_from <= '2016-05-30') as may;