[load_grdList]
select
hn.hin_cd
, hn.hin_nm
, hn.hin_sts
, hn.cat_cd
, hn.brand_cd
, han1.han_name
, hn.del_flg
, hn.cre_time
, hn.upd_time
, hn.stop_flg
, hn.stanka
, hn.biko1
, hn.biko2
, hn.tani
, hn.inner_flg
, hn.non_stock_flg
from m_hin hn
left join m_hanyo han1 on (hn.tani = han1.han_cd and han1.mst_kbn = '44')
where 1 = 1
and ((hn.hin_cd like '%:hin_cd%') or ('' = ':hin_cd'))
and ((hn.hin_nm like '%:hin_nm%') or ('' = ':hin_nm'))
and (('' = ':cat_cd') or (hn.cat_cd = ':cat_cd'))
and ((substr(hn.hin_cd,4,3) = ':hin_sts') or ('' = ':hin_sts')) or (hn.hin_sts = ':hin_sts')
--and (('' = case when hn.hin_sts = '' then '' else ':cat_cd' ||':hin_sts' end ) or (hn.hin_sts = case when hn.hin_sts = '' then '' else ':cat_cd' ||':hin_sts'end ))
and (('' = ':brand_cd') or (brand_cd = ':brand_cd'))
order by hn.hin_cd

[updateDelFlg]
update m_hin set
	del_flg = 1
	,upd_id = ':id_user'
	,upd_time = now()
where
	hin_cd = ':hin_cd'
