insert into table1
(uuid,no1, no2, date1)
select next1.nextval, no1,no2, sysdate
from (select a.no1,a.no2
from (select a.no1,
decode(substr(a.no2, 1, 1),chr(39),substr(a.no2, 2),a.no2) no2
from table2 a
where to_char(a.time1, 'YYYYMMDD') =
to_char(sysdate, 'YYYYMMDD')) a
group by a.no1,a.no2);
(uuid,no1, no2, date1)
select next1.nextval, no1,no2, sysdate
from (select a.no1,a.no2
from (select a.no1,
decode(substr(a.no2, 1, 1),chr(39),substr(a.no2, 2),a.no2) no2
from table2 a
where to_char(a.time1, 'YYYYMMDD') =
to_char(sysdate, 'YYYYMMDD')) a
group by a.no1,a.no2);