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
查看全文
相关阅读:
面向对象 (11)求交并集 判断字符形式
软件工程 课程总结
面向对象 (10)正则判邮箱
面向对象 (9)计算时间差 找随机数范围内规律
面向对象 (8)字符串出现字符个数统计 字母组成回文串判定
面向对象 (7)中介买房 平均数异常处理
面向对象 (6)买房付首款
第16周作业
第15周作业
迟到的第14周作业
原文地址:https://www.cnblogs.com/benio/p/1582382.html
最新文章
第13周作业集
软件工程结课作业
第13次作业--邮箱的正则表达式
第12次作业--你的生日
第11次作业--字符串处理
第10次作业
找回感觉的练习
第16周作业
第15周作业
迟到的第14周作业
热门文章
第13周作业集
软件工程结课作业
第13次作业
第12次作业--你的生日
第11次作业--字符串处理
第10次作业
找回感觉的练习
面向对象 (14)线程输出时间
面向对象 (13)数据库访问
面向对象 (12)文件查找
Copyright © 2011-2022 走看看