第三代数码暴龙机:关于碰到的一个shell中插入sql的问题

来源:百度文库 编辑:高校问答 时间:2024/04/29 17:42:15
小弟写了一个shell,如下:
#!/usr/bin/ksh
sqlplus rtcuser/password << sqlend
insert into t_reportcopy (internal_id, version, update_time, report_id, report_name, report_unit, unit_name, dept_id, report_origin, report_type, report_date ) select internal_id, version, update_time, report_id, report_name, report_unit, unit_name, dept_id, report_origin, report_type, report_date from t_reportindex
where (report_unit='0892' and report_date=to_date('20060402','yyyy-mm-dd'))
or (report_unit='0894' and report_date=to_date('20060402','yyyy-mm-dd'))
or (report_unit='0891' and report_date=to_date('20060402,'yyyy-mm-dd'));
exit
sqlend
执行中到了sql部分时候就僵死在那里,但是把sql语句单独放在splplus工具下执行就可以迅速执行,但是采取在neterm登陆sqlplus执行,又僵死,急的跳墙,在线等,感谢感谢