【发布时间】:2010-08-28 15:21:30
【问题描述】:
在 windows 上使用 sqlplus 11g 在 11g 数据库上运行 sql 脚本。如果插入行留在脚本中,则 Sqlplus 挂起。如果我注释掉插入行,脚本会返回记录。
在sql developer中运行时,脚本执行时间
我试图让插入语句成为一条具有相同结果的连续行。
使用 echo on,它会在 sql 最后一行之后挂起(...为 null;)并显示一个新行开始,永远不会处理提交。我假设我的插入语句的语法不正确,无法在 sqlplus 中运行
命令行调用:
sqlplus e_fraud/e_fraud@eftst2 @"C:\temp\Actimize_ETL\Versions\03\sql\merge2000_insert_new_bank_keys.sql"
sql脚本:
--insert into e_fraud.bank
select stg.bank_key bank_key, stg.bank_key bank_name from
(
select distinct account_bank bank_key
from e_fraud.rgbk_stg_account
where account_bank is not null
or account_bank != ''
UNION
select distinct bank_key
from e_fraud.rgbk_stg_branch
where bank_key is not null
or bank_key != ''
) stg
left outer join e_fraud.bank b
on stg.bank_key = b.bank_key
where b.bank_key is null;
commit;
exit;
【问题讨论】: