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
查看全文
相关阅读:
J2SE之网络编程
JAVA正则表达式语法大全
JAVA小程序在线聊天系统
简单小程序代码行数计数器
android回调函数总结
MetaCharacters正则表达式
简单小程序抓取网页中的email地址。
Oracle学习<二>
html标签大全
如何做页面优化
原文地址:https://www.cnblogs.com/benio/p/1582382.html
最新文章
docker学习笔记
Gulp系列文章常用插件
CentOS6.6 安装 Nodejs 环境
webpack入门篇理解入口、输出、加载器和插件
linux中文字体设置
把本地文件上传到服务器的命令,scp命令
终端编辑神器, Vim 常用快捷操作
Gulp系列文章实际项目配置
docker安装笔记
SAP BW 服务器安装 (一)
热门文章
商务智能的定义
SharePoint 2010增强后的通知功能
如何修改SharePoint 2010默认的任务通知邮件的格式?
商务智能与交易系统的区别
EXCEL:获取某列或得中最后一个非空单元格的行数和数值
项目经理主要工作职责
商务智能在企业信息化建设中的位置
SAP BW 服务器安装 (三)
SAP BW 服务器安装 (二)
Oracle学习<一>
Copyright © 2011-2022 走看看