[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 , '' as jan_cd 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)) union all select 0 --shiji_no , 0 --row_no , t.hin_cd , t.hin_nm , null --sir_cd , null --sir_nm , t.hacyu_irai_su , null --hacyu_no , null --hacyu_row_no , null --size_l , null --size_w , null --size_h , t.hacyu_biko --meisai_biko , null --jucyu_no , null --jucyu_row_no , null --syori_ymd , null --nonyu_ymd , t.hacyu_irai_tan_cd --tok_cd , tn.tan_nm --tok_nm , t.hacyu_irai_ymd --hacyu_irai_ymd , t.jan_cd from m_hin t left join m_tanto tn on (t.hacyu_irai_tan_cd = tn.tan_cd) where 1 = 1 and t.hacyu_irai_su != 0 and (('' = ':hin_cd') or (t.hin_cd = ':hin_cd')) and ((t.hin_nm like '%:hin_nm%') or ('' = ':hin_nm')) 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 (t.hacyu_irai_tan_cd = ':tok_cd')) order by shiji_no, row_no, hin_cd [deleteWork] delete from w_basv3120_sel where s_id = :s_id [insertWork] insert into w_basv3120_sel (s_id, shiji_no, row_no, hin_cd, del_flg, cre_id, cre_time, upd_id, upd_time) values (:s_id, :shiji_no, :row_no, ':hin_cd', 0, ':login_id', now(), ':login_id', now())