首页 新闻 会员 周边 捐助

oracle语句错在哪里?

0
悬赏园豆:10 [已解决问题] 解决于 2016-06-25 19:11
select o.score own_score, f.score fall_score, n.countsum presure_score from

(select score,patient_id from OWN_RECORD where patient_id = '00807004' and visit_id = '1' and rownum = 1) o
join
(select score,patient_id from FALL_ES where patient_id = '00807004' and visit_id = '1' and rownum = 1) f
join
(select countsum, pid from NURSING_RECORD_PRESSURE where pid = '00807004' and vid='1' ) n

on o.patient_id = f.patient_id and f.patient_id = n.pid

报错:missing keyword。

请问错在哪里?

Eysa的主页 Eysa | 初学一级 | 园豆:62
提问于:2016-06-20 09:22
< >
分享
最佳答案
0
select o.score own_score, f.score fall_score, n.countsum presure_score from

(select score,patient_id from OWN_RECORD where patient_id = '00807004' and visit_id = '1' and rownum = 1) o
join
(select score,patient_id from FALL_ES where patient_id = '00807004' and visit_id = '1' and rownum = 1) f on o.patient_id = f.patient_id
join
(select countsum, pid from NURSING_RECORD_PRESSURE where pid = '00807004' and vid='1' ) n

on f.patient_id = n.pid

 

收获园豆:10
刘宏玺 | 专家六级 |园豆:14020 | 2016-06-20 12:27
其他回答(2)
0

on条件一个一个来

laugher_ccc | 园豆:593 (小虾三级) | 2016-06-20 09:41

 怎么写?请教。

支持(0) 反对(0) Eysa | 园豆:62 (初学一级) | 2016-06-20 10:58
0

一个join/inner join/left join/right join 后面一定要有一个 on 作为关联条件

SUKHOIIII | 园豆:11 (初学一级) | 2016-07-07 11:41
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册