[loadOriginal] select fnc_update_sum_range_uri(:s_id, ':syori_ymd_fr', ':syori_ymd_to', '', '', '', ':tok_cat_cd', '', '', '', '', '', '', '', '', ':eig_cd', ':eig_cd', '', ':login_id') [load_grdList] select 0 as kbn_i , (case(':sum_kbn')when('hdcat')then(w.hin_dcat_cd)when('hmcat')then(w.hin_mcat_cd)when('hcat')then(w.hin_cat_cd)when('tcat')then(w.tok_cat_cd)when('yoto')then(w.yoto_cd)else(w.tok_cd)end) as tok_cd , (case(':sum_kbn')when('hdcat')then(h14.han_name)when('hmcat')then(h1a.han_name)when('hcat')then(h05.han_name)when('tcat')then(h35.han_name)when('yoto')then(hap.han_name)else((case when(mt.tok_rnm != '')then(mt.tok_rnm)else(w.tok_nm)end))end) as tok_nm , w.suryo , w.kingaku , w.genka_gaku , w.arari_gaku , (case when(w.kingaku != 0)then(round(w.arari_gaku * 100 / w.kingaku,2))else(null)end) as arari_rate , w.kosei_rate , w.result_rank from w_sum_range_uri w left join m_tokui mt on (mt.tok_cd = w.tok_cd) left join m_hanyo h14 on (h14.mst_kbn = '14' and h14.han_cd = w.hin_dcat_cd) left join m_hanyo h1a on (h1a.mst_kbn = '1A' and h1a.han_cd = w.hin_mcat_cd) left join m_hanyo h05 on (h05.mst_kbn = '05' and h05.han_cd = w.hin_cat_cd) left join m_hanyo h35 on (h35.mst_kbn = '35' and h35.han_cd = w.tok_cat_cd) left join m_hanyo hap on (hap.mst_kbn = 'AP' and hap.han_cd = w.yoto_cd) where 1 = 1 and w.s_id = :s_id and w.sum_kbn = ':sum_kbn' union all select 1 as kbn_i , '' as tok_cd , 'v' as tok_nm , w.suryo , w.kingaku , w.genka_gaku , w.arari_gaku , (case when(w.kingaku != 0)then(round(w.arari_gaku * 100 / w.kingaku,2))else(null)end) as arari_rate , w.kosei_rate , null as result_rank from w_sum_range_uri w --left join m_tokui mt on (mt.tok_cd = w.tok_cd) --left join m_hanyo h14 on (h14.mst_kbn = '14' and h14.han_cd = w.hin_dcat_cd) --left join m_hanyo h1a on (h1a.mst_kbn = '1A' and h1a.han_cd = w.hin_mcat_cd) --left join m_hanyo h35 on (h35.mst_kbn = '35' and h35.han_cd = w.tok_cat_cd) where 1 = 1 and w.s_id = :s_id and w.sum_kbn = 'total' order by kbn_i, result_rank, tok_cd