当前位置: 代码迷 >> Web开发 >> shell操作oracle的有关问题
  详细解决方案

shell操作oracle的有关问题

热度:157   发布时间:2012-03-17 19:06:28.0
shell操作oracle的问题?
ibm   unix

需要update   oracle里一表

第一种情况
一table.txt文件   内容如下
name       no         time
hgc         86         20070508
hgc         82         20070508
hgc         81         20070508
idd         42         20070503..............

如何通过shell编程   来实现
update   table2   set     end_time= '20070508 '
where   num= '86 '   and   id= 'hgc '

update   table2   set     end_time= '20070508 '
where   num= '82 '   and   id= 'hgc '

....................

update   table2   set     end_time= '20070503 '
where   num= '42 '   and   id= 'idd '


第二种情况
一table.txt文件   内容如下
update   table2   set     end_time= '20070508 '   where   num= '86 '   and   id= 'hgc '

update   table2   set     end_time= '20070508 '   where   num= '82 '   and   id= 'hgc '

....................

update   table2   set     end_time= '20070503 '   where   num= '42 '   and   id= 'idd '

如何通过shell编程   来实现   执行table.txt   里的sql

由于对shell编程不太熟悉,任务比较急,所以希望大家多多帮忙


------解决方案--------------------
  相关解决方案