日期:2014-05-17 浏览次数:21129 次
insert into swg_log_coll
(bank_no,
dep_name,
user_name,
full_name,
domain,
category,
gen_date,
log_state,
protocol,
hits,
addup_time,
record_cnt)
select bank_no,
nvl(dep_name, '--'),
nvl(user_name, '--'),
nvl(full_name, '--'),
nvl(domain, '--'),
nvl(category, '--'),
gen_date,
log_state,
nvl(protocol, '--'),
sum(hits),
sum(addup_time),
count(1)
from sr_swg_log_temp s)
where trunc(s.gen_date) >= to_date('"+earlietDate+"', 'yyyy-mm-dd')
and trunc(s.gen_date) <= to_date('"+madate+"', 'yyyy-mm-dd')
and log_state = '01'
group by bank_no,
dep_name,
user_name,
full_name,
domain,
gen_date,
category,
log_state,
protocol;