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
| SELECT f1.action_cleunik, f1.choix_cleunik, f1.dateheuredebut, DATE_FORMAT( f1.dateheuredebut, GET_FORMAT( DATE, 'EUR' ) ) AS `datedebut` , DATE_FORMAT( f1.dateheuredebut, GET_FORMAT( TIME, 'ISO' ) ) AS `heuredebut` , f1.dateheurefin, DATE_FORMAT( f1.dateheurefin, GET_FORMAT( DATE, 'EUR' ) ) AS `datefin` , DATE_FORMAT( f1.dateheurefin, GET_FORMAT( TIME, 'ISO' ) ) AS `heurefin` , f1.dateheurecreation, f1.dateheuremodif, f1.description, f2.choix_valeur_texte_01 AS genre, f3.choix_valeur_texte_01 AS priorite, f4.choix_valeur_texte_01 AS statut, f5.act_cleunik, f5.int_cleunik, f5.portee AS 'portee', f6.raisonsoc AS `raisonsoc` , concat_ws( ' ', f7.prenom, f7.patronyme ) AS `qui_interlo`
FROM _actions f1
LEFT JOIN _graal f5
USING ( action_cleunik )
LEFT JOIN _acteurs f6
USING ( act_cleunik )
LEFT JOIN _act_interlo f7
USING ( int_cleunik ) , _choix f2, _choix f3, _choix f4
WHERE f2.choix_cleunik = f1.choix_cleunik
AND f3.choix_cleunik = f1.priorite
AND f4.choix_cleunik = f1.statut
AND (
f5.principal =2
OR f5.principal IS NULL
)
AND (
f1.description LIKE '%%'
OR f1.description IS NULL
)
AND (
(
f1.dateheuredebut
BETWEEN '19610123000000'
AND '20610123235959'
)
OR (
f1.dateheurefin
BETWEEN '19610123000000'
AND '20610123235959'
)
)
ORDER BY f1.dateheuredebut DESC
LIMIT 0 , 150 |
Partager