[selectRecords] select 'ꗗ' as report_nm, v.tok_cd as tok_cd, to_char(to_date(v.seikyu_ymd, 'YYYYMMDD'), 'yyyy/mm/dd') as seikyu_ymd, -- v.shime_dd, -- v.seikyu_no, -- v.zen_seikyu_ymd, v.zen_seikyu_zan as zen_seikyu_zan, v.nyukin_gaku as nyukin_gaku, v.kurikoshi_gaku as kurikoshi_gaku, v.zeinuki_gaku as zeinuki_gaku, v.zei_gaku as zei_gaku, v.zeikomi_gaku as zeikomi_gaku, -- v.den_cnt, v.seikyu_zan as seikyu_zan, to_char(to_date(v.nyukin_yotei_ymd, 'YYYYMMDD'), 'yyyy/mm/dd') as nyukin_yotei_ymd, mt.tok_nm as tok_nm, -- mt.tori_kbn, mt.shime_dd, mt.pay_m, mt.pay_d, mt.biko1, mt.tan_cd, mt.tori_cond, mt.zei_calc_kbn, mt.keisyo, mt.tok_rnm from t_urikake v inner join m_tokui mt on (v.tok_cd = mt.tok_cd) left join m_tanto tn on (tn.tan_cd = mt.tan_cd) where 1=1 and v.del_flg= 0 and (('' = '&16') or (v.seikyu_ymd >= '&16')) and (('' = '&17') or (v.seikyu_ymd <= '&17')) and (('' = '&2') or (tn.bu_cd = '&2')) and (('' = '&24') or (tn.tan_cd >= '&24')) and (('' = '&25') or (tn.tan_cd <= '&25')) and (('' = '&4') or (mt.cat_cd = '&4')) and (('' = '&20') or (mt.tok_cd >= '&20')) and (('' = '&21') or (mt.tok_cd <= '&21')) and (('' = '&20') or (mt.tok_cd >= '&20')) and (('' = '&21') or (mt.tok_cd <= '&21')) and (('1' = '&30') or (v.seikyu_zan <> 0)) --and (v.tan_cd >= '&7' or '' = '&7') and (v.tan_cd <= '&8' or '' = '&8') --and (v.seikyu_ymd >= '&4' or '' = '&4') and (v.seikyu_ymd <= '&5' or '' = '&5') --and (v.tok_cd >= '&7' or '' = '&7') and (v.tok_cd <= '&8' or '' = '&8') --and (v.tan_cd >= '&9' or '' = '&9') and (v.tan_cd <= '&10' or '' = '&10') order by v.seikyu_ymd,v.tok_cd /* select 'ꗗ' as report_nm, t.nyukin_no ,to_date(t.nyukin_ymd, 'YYYYMMDD') as nyukin_ymd , t.total_gaku, t.nyukin_gaku , t.tok_cd, tk.tok_nm , t.tan_cd, tan.tan_nm , t.nyukin_kbn, han.han_name , to_date(t.tegata_ymd, 'YYYYMMDD') as tegata_ymd , t.tegata_no, t.biko , t.tesuryo, t.cyosei_gaku , to_char(t.cre_time,'yyyy/mm/dd') as cre_time , to_char(t.upd_time,'yyyy/mm/dd') as upd_time from t_nyukin t left join m_tokui tk on tk.tok_cd = t.tok_cd left join m_tanto tan on (tan.tan_cd = t.tan_cd) left join m_hanyo han on (t.nyukin_kbn = han.han_cd and mst_kbn = '13') where 1 = 1 and t.del_flg= 0 and (t.nyukin_ymd >= '&1' or '' = '&1') and (t.nyukin_ymd <= '&2' or '' = '&2') and (t.tok_cd >= '&3' or '' = '&3') and (t.tok_cd <= '&4' or '' = '&4') and (t.tan_cd >= '&5' or '' = '&5') and (t.tan_cd <= '&6' or '' = '&6') order by t.nyukin_ymd,t.nyukin_no ; */