Oracle8i的左连接问题

zxbyhcsdn 2004-12-20 10:34:48
问一下哟!!Oracle中的左连接问题!!

select A.fld1,
B.*
from haha A ,(select * from haha where fld2='hehe' ) B
where A.fld1=substr(B.fld1,1,2)(+);
要出错!!
错出在这个地方A.fld1=substr(B.fld1,1,2)(+);

难道(+)左边就不能用函数了么??

8i又不能用Left join
...全文
86 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
yown 2004-12-20
  • 打赏
  • 举报
回复
select A.fld1,
B.*
from haha A ,(select * from haha where fld2='hehe' ) B
where A.fld1(+)=substr(B.fld1,1,2);
YuriOU 2004-12-20
  • 打赏
  • 举报
回复
更正:
select A.fld1,
B.*
from haha A left join
(select * from haha where fld2='hehe' ) B
on A.fld1=substr(B.fld1,1,2);
YuriOU 2004-12-20
  • 打赏
  • 举报
回复
或:

select A.fld1,
B.*
from haha A left join
(select * from haha where fld2='hehe' ) B
where A.fld1=substr(B.fld1,1,2);
YuriOU 2004-12-20
  • 打赏
  • 举报
回复

select A.fld1,
B.*
from haha A ,(select * from haha where fld2='hehe' ) B
where A.fld1=substr(B.fld1(+),1,2);
doulikeme 2004-12-20
  • 打赏
  • 举报
回复
放里面行不?

A.fld1=substr(B.fld1(+),1,2);

17,086

社区成员

发帖
与我相关
我的任务
社区描述
Oracle开发相关技术讨论
社区管理员
  • 开发
  • Lucifer三思而后行
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧