--创建自增序列
create sequence billing.SEQ_SERVICE_IB
minvalue 1
maxvalue 9999
start with 2341
increment by 1
cache 20
cycle
order;
--赠款
select count(*) from crm_user.q_recharge;
(order_id,
device_number,
charge_type,
amount,
channel_id,
jd_pin,
user_event_code,
jd_order_id)
select (substr(to_char(sysdate, 'yyyymmddhh24mi'), 3, 13) ||
crm_order.seq_service_ib.nextval),
device_number,
'Z',
'1000',
'999',
device_number,
'18',
device_number
from (select * from tydic.andy_jdfl_0226_cyhd d where d.device_number);
create sequence billing.SEQ_SERVICE_IB
minvalue 1
maxvalue 9999
start with 2341
increment by 1
cache 20
cycle
order;
--赠款
select count(*) from crm_user.q_recharge;
(order_id,
device_number,
charge_type,
amount,
channel_id,
jd_pin,
user_event_code,
jd_order_id)
select (substr(to_char(sysdate, 'yyyymmddhh24mi'), 3, 13) ||
crm_order.seq_service_ib.nextval),
device_number,
'Z',
'1000',
'999',
device_number,
'18',
device_number
from (select * from tydic.andy_jdfl_0226_cyhd d where d.device_number);