[load_grdList] select uh.den_no , uh.nonyu_nm as tok_tan --‘ŠŽè“¾ˆÓ�æ’S“–ŽÒ , uh.record_ymd --”„�ã“ú , uh.syori_ymd --�¿‹�“ú , uh.tok_nm --“¾ˆÓ�æ --, uh.eig_cd --‰c‹Æ�ŠCD , eig.han_name as eig_nm --‰c‹Æ�Š–¼ --, uh.chimei1_cd --�Ï’n --, uh.chimei2_cd --�~’n , uh.chimei1_nm --�Ï’n , uh.chimei2_nm --�~’n , uh.haiso_kanri_cd --ŽÔçp , uh.haiso_info1 --ŽÔ”Ô , info2.han_name as haiso_info2 --ŽÔŽí , uh.haiso_tan_nm --�æ–±ˆõ --, tan.tan_nm as haiso_tan_nm --�æ–±ˆõ --, uh.sir_cd --—bŽÔ�æ , sir.sir_nm --—bŽÔ�æ , tan.tan_nm --“ü—ÍŽÒ , uh.biko1 --”õ�l , uh.biko2 --”õ�l from t_uri uh --inner join t_uri_m um on (um.den_no = uh.den_no) --left join m_tokui tok on (tok.tok_cd = uh.tok_cd) --left join m_nonyu non on (non.tok_cd = non.tok_cd and non.nonyu_no::text = uh.haiso_tan_cd) --’S“–ŽÒ left join m_sir sir on (sir.sir_cd = uh.sir_cd) --—bŽÔ�æ left join m_haiso haiso on (haiso.haiso_kanri_cd = uh.haiso_kanri_cd) --”z‘—•û–@ left join m_tanto tan on (tan.tan_cd = uh.haiso_tan_cd) --”z‘—’S“– left join m_hanyo eig on (eig.han_cd = uh.eig_cd and eig.mst_kbn = '79') --‰c‹Æ�Š left join m_hanyo info2 on (info2.han_cd = uh.haiso_info2 and info2.mst_kbn = '80') --ŽÔŽí WHERE 1 = 1 and uh.del_flg = 0 --and uh.jucyu_flg = 1 and ((uh.den_no = fnc_to_number(':den_no')) or ('' = ':den_no')) and (('' = ':syori_ymd_fr') or (uh.record_ymd >= ':syori_ymd_fr')) and (('' = ':syori_ymd_to') or (uh.record_ymd <= ':syori_ymd_to')) and (('' = ':seikyu_ymd_fr') or (uh.syori_ymd >= ':seikyu_ymd_fr')) and (('' = ':seikyu_ymd_to') or (uh.syori_ymd <= ':seikyu_ymd_to')) and (('' = ':tok_cd') or (uh.tok_cd = ':tok_cd')) and ((uh.tok_nm like '%:tok_nm%') or ('' = ':tok_nm')) and (('' = ':sir_cd') or (uh.sir_cd = ':sir_cd')) --—fŽÔ�æ and ((sir.sir_nm like '%:sir_nm%') or ('' = ':sir_nm')) --—fŽÔ�æ and (('' = ':haiso_info1') or (uh.haiso_info1 like '%:haiso_info1%')) --”zŽÔ and ((uh.biko1 like '%:biko1%' or uh.biko2 like '%:biko1%') or ('' = ':biko1')) --and (('' = ':zan_flg') or (COALESCE(um.jucyu_su,0) - COALESCE(um.uri_su,0) > 0)) order by uh.record_ymd desc, uh.syori_ymd desc, uh.den_no desc ; [delete_w0110] delete from w_basr0110 where s_id = :s_id ; [insert_w0110] insert into w_basr0110 (s_id, den_no) SELECT :s_id ,um.den_no from t_uri uh inner join t_uri_m um on (um.den_no = uh.den_no) left join m_tokui tk on (uh.tok_cd = tk.tok_cd) WHERE 1 = 1 and uh.jucyu_flg = 1 and ((uh.den_no = fnc_to_number(':den_no')) or ('' = ':den_no')) and (('' = ':syori_ymd_fr') or (uh.syori_ymd >= ':syori_ymd_fr')) and (('' = ':syori_ymd_to') or (uh.syori_ymd <= ':syori_ymd_to')) and (('' = ':seikyu_ymd_fr') or (um.nonyu_ymd >= ':seikyu_ymd_fr')) and (('' = ':seikyu_ymd_to') or (um.nonyu_ymd <= ':seikyu_ymd_to')) and (('' = ':tok_cd') or (uh.tok_cd = ':tok_cd')) and ((uh.tok_nm like '%:tok_nm%') or ('' = ':tok_nm')) and ((uh.biko1 like '%:biko1%' or uh.biko2 like '%:biko1%') or ('' = ':biko1')) and (('' = ':zan_flg') or (COALESCE(um.jucyu_su,0) - COALESCE(um.uri_su,0) > 0)) order by um.nonyu_ymd, uh.syori_ymd, um.den_no, um.row_no ;