[load_grdList]
select 
  m.sir_cd
, m.sir_nm
, m.seikyu_ymd
, m.shime_dd
, r.zen_seikyu_zan
, r.syukin_gaku
, r.kurikoshi_gaku
, r.zeinuki_gaku
, r.zei_gaku
, r.zeikomi_gaku
, r.seikyu_zan
, r.den_cnt
from m_sir m
left join t_kaikake r on (r.sir_cd = m.sir_cd and r.seikyu_ymd = m.seikyu_ymd)
where 1 = 1
and m.del_flg = 0
and ((m.sir_cd = ':sir_cd') or (':sir_cd' = ''))
and ((m.sir_nm like '%:sir_nm%') or (m.sir_kana like '%:sir_nm%') or (':sir_nm' = ''))
and ((m.shime_dd = fnc_to_number(':shime_dd')) or ('' = ':shime_dd'))
and ((':chk_zero' = '1') or (
    r.zen_seikyu_zan != 0
 or r.syukin_gaku != 0
 or r.kurikoshi_gaku != 0
 or r.zeinuki_gaku != 0
 or r.zei_gaku != 0
 or r.zeikomi_gaku != 0
 or r.seikyu_zan != 0
 or r.den_cnt != 0
))
order by sir_cd




