【发布时间】:2018-08-28 13:20:40
【问题描述】:
我有以下select statement:
select dte, wm_concat(issue) as issues
from ((select date_a as dte, issue from t where date_a is not null) union all
(select date_b, issue from t where date_b is not null)
) di
group by dte
order by dte;
返回多行,例如:
DTE | ISSUES
-----------+---------
01/JUN/91 | EE
01/JUN/03 | EE
01/JAN/06 | HH
01/AUG/06 | EE
01/AUG/08 | EE,HS,HE
我想将这些记录插入到一个表中。
问题
我应该如何编写插入语句?我应该使用游标,因为似乎 INSERT 可以一次处理一行?
【问题讨论】:
标签: sql oracle10g sql-insert