Oracle更新多行
更新多行的步骤:
步骤多,但效率比较高:
1、create table 临时表 value (select a.id,a.name,b.name,... from table1 a,table2 b where a.id=b.id)
2、删除table1中的记录,不要drop
3、insert into table1 select 你需要的字段 from 临时表。
select * from tb_ai03
create table tb_ai031 as select * from tb_ai03
delete from tb_ai03 a where a.yymm in ('200911','200910')
insert into tb_ai03
select a.model,a.yysal/b.unitestrip as yysal ,a.mmsal/b.unitestrip as mmsal,
a.yychu/b.unitestrip as yychu,a.mmchu/b.unitestrip as mmchu,a.yymm
from tb_ld04 b,tb_ai031 a
where a.model=b.model(+) and a.yymm in ('200911','200910')
相关文档:
1、下载oracle软件
http://www.oracle.com/technology/software/tech/oci/instantclient/index.html
oracle-instantclient-basic-10.2.0.4-1.i386.rpm
oracle-instantclient-sqlplus-10.2.0.4-1.i386.rpm
oracle-instantclient-devel-10.2.0.4-1.i386.rpm
2、安装rpm包
rpm -ivh oracle-instantclient-basic-10.2.0.4 ......
在开发应用的时候,把数据按照一定的规则排序后再取前几条数据这种操作是很平常的事情。我们在Oracle中常用的就是order by,然后取得rownum小于多少的数据这种方法。不过如果对Oracle不熟悉,也许就会发现你写的SQL语句检索出来的值不正确,这个是为什么呢。 因为Oracle在检索的时候,会首先把数据都检索出来,然后在排序段 ......
ORACLE的lpad函数、rpad函数用法
语法:select lpad('12345678',1,'0') from dual;
返回字符串‘12345678’的从左边长度为1的字符串,如果不够,左边补‘0’
语法:select rpad('12345678',1,'0') from dual;
返回字符串‘12345678’的从左边长度为1的字符串,如果不够,右边补&ls ......
应付模块的多数业务基于采购和库存的操作,因此应付模块的月结应该在采购模块和库存模块月结后才能关闭会计期。
月结步骤
在每个会计期末,应付模块的月结应遵循以下流程:
1.检查业务是否全部录入;
2.检查是否有未验证、暂挂发票;
3.更新到期的远期付款状态;
4.检查应付业务是否生成分录;
5.应付业务传送到总帐;
6 ......
Oracle 10.1 Statistics:
In Oracle 9.2 there were 264 statistics; in Oracle 10.1 there are 332 statistics
The following table shows the 106 statistics that were added in Oracle 10.1:
Name
application wait time
cluster wait time
concurrency wait time
consistent gets direct
consistent ......