[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 v.zeikomi_gaku != 0 and (('' = '&16') or (v.nyukin_yotei_ymd >= '&16')) and (('' = '&17') or (v.nyukin_yotei_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')) order by v.nyukin_yotei_ymd,v.tok_cd ; /* select '‰ñŽû—\’è' as report_nm, v.tok_cd as tok_cd, v.seikyu_ymd 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, v.zei_gaku, v.zeikomi_gaku, -- v.den_cnt, v.seikyu_zan, mt.tok_nm as tok_nm, -- mt.tori_kbn, mt.shime_dd, mt.pay_m, mt.pay_d, mt.biko1, mt.tan_cd, 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) where 1=1 and v.tok_cd = '1129' and v.seikyu_ymd >= '20170401' and v.seikyu_ymd <= '20170430' and v.del_flg= 0 order by 1 */