詭異的sql

select s.investigationno,
       s.receptionno,
       s.caseno,
       s.casetype,
       s.casecategory,
       s.lawreserver1,
       s.investigationdatefrom,
       s.investigationdateto,
       (select t.content
          from common_bigtext_clob t
         where t.id = s.investnoteid) as kyjc,
       (select slc.case_level
          from scene_law_case slc
         where slc.id = s.caseid) as jqfl,
       s.initserverno,
       s.createdatetime,
       s.submitdate,
       (case
         when (s.HANDPRINTAMOUNT > 0 or s.FOOTPRINTAMOUNT > 0 or
              s.TOOLMARKAMOUNT > 0 or s.BULLETPRINTAMOUNT > 0 or
              s.SPECIALPRINTAMOUNT > 0 or s.BIOEVIDENCEAMOUNT > 0 or
              s.TOXICEVIDENCEAMOUNT > 0 or s.PHYSICALEVIDENCEAMOUNT > 0 or
              s.FILEEVIDENCEAMOUNT > 0 or s.ELECTROEVIDENCEAMOUNT > 0 or
              s.VIDEOEVIDENCEAMOUNT > 0 or s.OTHEREVIDENCEAMOUNT > 0) then
          1
         else
          0
       end) as hjwz
  from scene_investigation_mv s
發佈了53 篇原創文章 · 獲贊 11 · 訪問量 14萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章