fzview_new.frm 3.4 KB

123456789101112131415
  1. TYPE=VIEW
  2. query=select `evthy`.`intPastureId` AS `intPastureId`,(case when (`lastcalving`.`bitIsfetus` = 1) then (to_days(`evthy`.`dateEvtDate`) - to_days(`lastevtcalv`.`dateEvtDate`)) else NULL end) AS `evtHYMRDate`,`evthy`.`intEvtId` AS `intEvtId`,`evthy`.`intCurFetal` AS `evtHYFetal`,if((`evthy`.`intCurFetal` = 1),\'头产\',\'经产\') AS `evtHYTcjc`,`evthy`.`intCowId` AS `evtCowId`,`evthy`.`dateEvtDate` AS `evtHYDate`,`heatwatch`.`hybri`.`intHyCount` AS `intHyCount` from (((`heatwatch`.`events` `evthy` join `heatwatch`.`hybri` on(((`heatwatch`.`hybri`.`intEvtId` = `evthy`.`intEvtId`) and (`heatwatch`.`hybri`.`intPastureId` = `evthy`.`intPastureId`)))) left join `heatwatch`.`events` `lastevtcalv` on(((`lastevtcalv`.`intCowId` = `evthy`.`intCowId`) and (`lastevtcalv`.`intPastureId` = `evthy`.`intPastureId`) and (`lastevtcalv`.`intClass` in (\'流产\',\'产犊\')) and (`lastevtcalv`.`dateEvtDate` < `evthy`.`dateEvtDate`)))) left join `heatwatch`.`calving` `lastcalving` on(((`lastcalving`.`intEvtId` = `lastevtcalv`.`intEvtId`) and (`lastcalving`.`intPastureId` = `lastevtcalv`.`intPastureId`))))
  3. md5=f138a81e570a7168ccc8c0c6dfb3a450
  4. updatable=0
  5. algorithm=0
  6. definer_user=roo
  7. definer_host=%
  8. suid=1
  9. with_check_option=0
  10. timestamp=2022-12-14 10:07:38
  11. create-version=1
  12. source=select `evthy`.`intPastureId` AS `intPastureId`,case when `lastcalving`.`bitIsfetus` = 1 then to_days(`evthy`.`dateEvtDate`) - to_days(`lastevtcalv`.`dateEvtDate`) else NULL end AS `evtHYMRDate`,`evthy`.`intEvtId` AS `intEvtId`,`evthy`.`intCurFetal` AS `evtHYFetal`,if(`evthy`.`intCurFetal` = 1,\'头产\',\'经产\') AS `evtHYTcjc`,`evthy`.`intCowId` AS `evtCowId`,`evthy`.`dateEvtDate` AS `evtHYDate`,`hybri`.`intHyCount` AS `intHyCount` from (((`events` `evthy` join `hybri` on(`hybri`.`intEvtId` = `evthy`.`intEvtId` and `hybri`.`intPastureId` = `evthy`.`intPastureId`)) left join `events` `lastevtcalv` on(`lastevtcalv`.`intCowId` = `evthy`.`intCowId` and `lastevtcalv`.`intPastureId` = `evthy`.`intPastureId` and `lastevtcalv`.`intClass` in (\'流产\',\'产犊\') and `lastevtcalv`.`dateEvtDate` < `evthy`.`dateEvtDate`)) left join `calving` `lastcalving` on(`lastcalving`.`intEvtId` = `lastevtcalv`.`intEvtId` and `lastcalving`.`intPastureId` = `lastevtcalv`.`intPastureId`))
  13. client_cs_name=utf8
  14. connection_cl_name=utf8_general_ci
  15. view_body_utf8=select `evthy`.`intPastureId` AS `intPastureId`,(case when (`lastcalving`.`bitIsfetus` = 1) then (to_days(`evthy`.`dateEvtDate`) - to_days(`lastevtcalv`.`dateEvtDate`)) else NULL end) AS `evtHYMRDate`,`evthy`.`intEvtId` AS `intEvtId`,`evthy`.`intCurFetal` AS `evtHYFetal`,if((`evthy`.`intCurFetal` = 1),\'头产\',\'经产\') AS `evtHYTcjc`,`evthy`.`intCowId` AS `evtCowId`,`evthy`.`dateEvtDate` AS `evtHYDate`,`heatwatch`.`hybri`.`intHyCount` AS `intHyCount` from (((`heatwatch`.`events` `evthy` join `heatwatch`.`hybri` on(((`heatwatch`.`hybri`.`intEvtId` = `evthy`.`intEvtId`) and (`heatwatch`.`hybri`.`intPastureId` = `evthy`.`intPastureId`)))) left join `heatwatch`.`events` `lastevtcalv` on(((`lastevtcalv`.`intCowId` = `evthy`.`intCowId`) and (`lastevtcalv`.`intPastureId` = `evthy`.`intPastureId`) and (`lastevtcalv`.`intClass` in (\'流产\',\'产犊\')) and (`lastevtcalv`.`dateEvtDate` < `evthy`.`dateEvtDate`)))) left join `heatwatch`.`calving` `lastcalving` on(((`lastcalving`.`intEvtId` = `lastevtcalv`.`intEvtId`) and (`lastcalving`.`intPastureId` = `lastevtcalv`.`intPastureId`))))