[load_grdList]
select
  t.shiji_no
, t.row_no
, t.hin_cd
, t.hin_nm
, t.sir_cd
, t.sir_nm
, t.hacyu_irai_su
, t.hacyu_no
, t.hacyu_row_no
, t.size_l
, t.size_w
, t.size_h
, t.meisai_biko
, sh.jucyu_no
, sh.jucyu_row_no
, jh.syori_ymd
, jm.nonyu_ymd
, jh.tok_cd
, jh.tok_nm
, t.hacyu_irai_ymd
from t_shiyou_zairyo t
inner join t_seizou sh on (sh.shiji_no = t.shiji_no)
inner join t_uri_m jm on (jm.den_no = sh.jucyu_no and jm.row_no = sh.jucyu_row_no)
inner join t_uri jh on (jh.den_no = jm.den_no)
where 1 = 1
and t.hacyu_irai_su != 0
and ((sh.jucyu_no = fnc_to_number(':den_no')) or ('' = ':den_no'))
and (('' = ':syori_ymd_fr') or (jh.syori_ymd >= ':syori_ymd_fr'))
and (('' = ':syori_ymd_to') or (jh.syori_ymd <= ':syori_ymd_to'))
and (('' = ':nonyu_ymd_fr') or (jm.nonyu_ymd >= ':nonyu_ymd_fr'))
and (('' = ':nonyu_ymd_to') or (jm.nonyu_ymd <= ':nonyu_ymd_to'))
and (('' = ':irai_ymd_fr') or (t.hacyu_irai_ymd >= ':irai_ymd_fr'))
and (('' = ':irai_ymd_to') or (t.hacyu_irai_ymd <= ':irai_ymd_to'))
and (('' = ':tok_cd') or (jh.tok_cd = ':tok_cd'))
and ((jh.tok_nm like '%:tok_nm%') or ('' = ':tok_nm'))
and (('' = ':sir_cd') or (t.sir_cd = ':sir_cd'))
and ((t.sir_nm like '%:sir_nm%') or ('' = ':sir_nm'))
and ((jh.biko1 like '%:biko1%' or jh.biko2 like '%:biko1%') or ('' = ':biko1'))
and (('' = ':hin_cd') or (t.hin_cd = ':hin_cd'))
and ((t.hin_nm like '%:hin_nm%') or ('' = ':hin_nm'))
and ((t.shiji_no = fnc_to_number(':shiji_no')) or ('' = ':shiji_no'))
and (('0' != ':cond_sekkei') or (t.hacyu_no is null))
and (('1' != ':cond_sekkei') or (t.hacyu_no is not null))
order by shiji_no, row_no

[deleteWork]
delete from w_basv3120_sel where s_id = :s_id

[insertWork]
insert into w_basv3120_sel (s_id, shiji_no, row_no, del_flg, cre_id, cre_time, upd_id, upd_time)
 values (:s_id, :shiji_no, :row_no, 0, ':login_id', now(), ':login_id', now())




