[load_grdList]
select
  t.nyukin_no
, t.tok_cd
, t.nyukin_ymd
, t.nyukin_kbn
, t.nyukin_gaku
, t.tesuryo
, t.cyosei_gaku
, t.total_gaku
, t.biko
, t.seikyu_flg
, t.seikyu_ymd
, h1.han_name as nyukin_kbn_nm
, tk.tok_nm
from t_nyukin t
left join m_tokui tk on (tk.tok_cd = t.tok_cd)
left join m_hanyo h1 on (h1.mst_kbn = '13' and h1.han_cd = t.nyukin_kbn)
where 1 = 1
and t.del_flg = 0
and ((t.nyukin_no = fnc_to_number(':den_no')) or ('' = ':den_no'))
and (('' = ':syori_ymd_fr') or (t.nyukin_ymd >= ':syori_ymd_fr'))
and (('' = ':syori_ymd_to') or (t.nyukin_ymd <= ':syori_ymd_to'))
and (('' = ':tok_cd') or (t.tok_cd = ':tok_cd'))
and ((tk.tok_nm like '%:tok_nm%') or ('' = ':tok_nm'))
and ((t.biko like '%:biko1%') or ('' = ':biko1'))
order by t.nyukin_ymd desc, t.nyukin_no desc





