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
查看全文
相关阅读:
JS中return函数
Java异常
ssh框架整合之注解版
ssh框架整合之xml版
Struts之拦截器
Struts入门初体验
Hibernate关联查询 一对多双向关联
Hibernate之hql
Aop小列子
深入.Net第二章总结
原文地址:https://www.cnblogs.com/benio/p/1582382.html
最新文章
联想小新700,虚拟机一直开不了原因记录
微信公众号开发:获取用户发送消息并实现回复(Java)
微信公众号开发:服务器配置(Java)
什么是前后端的跨域问题
Java基础:详解HashMap在多线程下不安全
mysql的乐观锁与悲观锁
JAVA基础:Spring Aop、拦截器、过滤器的区别
Java环境变量配置&解决版本不一致问题
初识算法
《C++ Primer》P314中使用insert重写单词统计程序的扩展
热门文章
对C++ Primer的10.3.9单词转换的思考
iterator迭代器的使用
【转】读枯燥的技术书时怎么集中精神?
linux ping 并发执行
LNMP web服务的安装
【OS X系统】Xcode中搭建Python环境。
JDBC,Hibernate,MyBatis的优缺点
ssh基本整合(配置版本)
Struts2之一个action中多个方法的实现
Struts2入门
Copyright © 2011-2022 走看看