[load_grdList]
select 
  m.tok_cd
, m.tok_nm
, m.seikyu_ymd
, m.shime_dd
, r.zen_seikyu_zan
, r.nyukin_gaku
, r.kurikoshi_gaku
, r.zeinuki_gaku
, r.zei_gaku
, r.zeikomi_gaku
, r.seikyu_zan
, r.den_cnt
, r.nyukin_yotei_ymd
from m_tokui m
left join t_urikake r on (r.tok_cd = m.tok_cd and r.seikyu_ymd = m.seikyu_ymd)
where 1 = 1
and m.del_flg = 0
and ((m.tok_cd = ':tok_cd') or (':tok_cd' = ''))
and ((m.tok_nm like '%:tok_nm%') or (m.tok_kana like '%:tok_nm%') or (':tok_nm' = ''))
and ((m.shime_dd = fnc_to_number(':shime_dd')) or ('' = ':shime_dd'))
and ((':yotei_ymd_fr' != '' or ':yotei_ymd_to' != '') or (r.seikyu_ymd = m.seikyu_ymd))
and (('' = ':yotei_ymd_fr') or (r.nyukin_yotei_ymd >= ':yotei_ymd_fr'))
and (('' = ':yotei_ymd_to') or (r.nyukin_yotei_ymd <= ':yotei_ymd_to'))
and ((':chk_zero' = '1') or (
    r.zen_seikyu_zan != 0
 or r.nyukin_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 tok_cd




