[selectRecords] select uh.den_no, (1+um.row_no) as row_no, to_char(to_date(uh.input_ymd, 'YYYYMMDD'), 'yyyy/mm/dd') as input_ymd, to_char(to_date(uh.syori_ymd, 'YYYYMMDD'), 'yyyy/mm/dd') as syori_ymd, uh.zeinuki_gaku, uh.zei_gaku, uh.zeikomi_gaku, -- um.hin_cd, (case when(mh.jan_cd != '')then(mh.jan_cd)else(um.hin_cd)end) as hin_cd, replace(um.hin_nm,chr(10),'')as hin_nm, um.suryo, um.tanka, um.kingaku, uh.tok_cd, t.tok_nm, -- t.zip_no, ''||substr(t.zip_no,1,3)||'-'||substr(t.zip_no,4,6) as zip_no, t.addr1, t.addr2, t.addr3, t.addr4, uh.payment_term as tori_cond, -- uh.biko1 --#25014 2022.07.27 MOD STT -- replace(replace(uh.biko1,chr(13)||chr(10),chr(10)),chr(10),chr(13)||chr(10)) as biko1 fnc_get_report_multiline(uh.biko1) as biko1 --#25014 2022.07.27 MOD END , h1.koumoku1 as furikikan1 , h1.koumoku2 as furikikan2 , h1.koumoku3 as furikikan3 , trunc(um.row_no / 37) as page_no from t_uri uh left join m_tokui t on(uh.tok_cd = t.tok_cd) left join t_uri_m um on(uh.den_no = um.den_no) left join m_hin mh on (mh.hin_cd = um.hin_cd) left join m_hanyo h1 on (h1.mst_kbn = '09' and h1.han_cd = t.furikikan) where 1 = 1 and uh.jucyu_flg = 0 and ((uh.syori_ymd >= '&1') or ('&1' = '')) and ((uh.syori_ymd <= '&2') or ('&2' = '')) and ((uh.den_no = fnc_to_number('&3')) or ('' = '&3')) and ((uh.tok_cd = '&4') or ('&4' = '')) and ((um.hin_nm like '%&5%') or ('&5' = '')) and (('&7' = '') or ( (uh.tok_cd,uh.seikyu_ymd) in (select tok_cd, seikyu_ymd from w_basr0030 w where w.s_id = fnc_to_number('&7')) )) order by uh.den_no,um.row_no