zoukankan
html css js c++ java
sql:关于Oracle的update from语句
还是带有SQL Server的习惯,在Oracle中经常使用update from结构,事实上Oracle中是不存在from语句的。
Code
1
update
hek_om_pop_lines_all
2
set
quantity_2
=
quantity_1
3
from
hek_om_pop_lines_all l, hek_om_pop_headers_all h, hek_om_user_ctl_v ctl
4
where
l.header_id
=
h.header_id
5
and
h.sold_to_org_id
=
ctl.customer_id
6
and
h.flow_status
=
'
enter
'
7
and
to_char(h.creation_date,
'
yyyymmdd
'
)
>=
&
p_start_date
8
and
to_char(h.creation_date,
'
yyyymmdd
'
)
<=
&
p_end_date
9
and
ctl.
user_id
=
1115
--
apps.fnd_profile.VALUE('user_id')
10
and
application
=
'
POP
'
;
error:ORA-00933:SQL Command not properly ended
Code
1
update
hek_om_pop_lines_all
2
set
quantity_2
=
quantity_1
3
where
header_id
in
(
select
h.header_id
4
from
hek_om_pop_headers_all h, hek_om_user_ctl_v ctl
5
where
h.flow_status
=
'
enter
'
6
and
to_char(h.creation_date,
'
yyyymmdd
'
)
>=
&
p_start_date
7
and
to_char(h.creation_date,
'
yyyymmdd
'
)
<=
&
p_end_date
8
and
ctl.
user_id
=
1115
--
apps.fnd_profile.VALUE('user_id')
9
and
application
=
'
POP
'
10
and
h.sold_to_org_id
=
ctl.customer_id);
成长
/ | \
学习 总结 分享
QQ交流群:122230156
查看全文
相关阅读:
ArrayList源码剖析
Qt线程外使用Sleep
malloc、calloc和realloc比较
C++各大名库
Qt 编译boost
VC++ 设置控件显示文本的前景色、背景色以及字体
std::map的操作:插入、修改、删除和遍历
time.h文件中包含的几个函数使用时须注意事项
赋值操作符和拷贝构造函数
virtual析构函数的作用
原文地址:https://www.cnblogs.com/benio/p/1582382.html
最新文章
C++内存泄露及常见情况总结
文献查询
uboot
kexec相关阅读
一篇牛X的文章,先收后读
linux进程调度机制
编译告警处理:dereferencing type-punned pointer will break strict-aliasing rules
samba学习
转载:大项目实用makefile
shell基础知识
热门文章
Introduction to the 80386
大数据实践(六)--hbase集群搭建(Ubuntu)
大数据实践(五)--Zookeeper集群搭建(Ubuntu)
大数据实验(四)MapReduce编程实践(Ubuntu)
Scala开发坏境设置(IDEA)
大数据实践(三)--Hadoop集群搭建(Ubuntu)
大数据实践(二)--Hdfs常见操作及Hbase安装
大数据实践(一)--Hadoop单机搭建(Ubuntu)
Python基本语法一览
LinkedList源码剖析
Copyright © 2011-2022 走看看