关于Oracle中left join简写写法在多条件时如何使用
select count(1)
from t_im_moveissuebill a
left join t_im_moveissuebillentry b
on a.fid = b.fparentid
left join t_bot_relation r
on a.fid = r.fsrcobjectid
left join t_im_moveinwarehsbillentry ib
on r.fdestobjectid = ib.fparentid
and b.fmaterialid = ib.fmaterialid
and b.fassistpropertyid = ib.fassistpropertyid
where to_char(A.Fbizdate, 'yyyy-mm-dd') >= '2013-08-01' and
to_char(A.Fbizdate, 'yyyy-mm-dd') <= '2013-08-15' and exists
(select 1 from TT_WHEREVALUES W where W.FID = B.FWAREHOUSEID)
and NVL(A.FAUDITORID, ' ') <> ' '
and NVL(A.FIsInitBill, 0) = 0以上的写法我获得的行数结果是9457.
下边的写法获得的行数结果是9331.
select count(1)
from t_im_moveissuebill a,
t_im_moveissuebillentry b,
t_bot_relation r,
t_im_moveinwarehsbillentry ib
where a.fid = b.fparentid
and to_char(A.Fbizdate, 'yyyy-mm-dd') >= '2013-08-01'
and to_char(A.Fbizdate, 'yyyy-mm-dd') <= '2013-08-15'
and exists
(select 1 from TT_WHEREVALUES W where W.FID = B.FWAREHOUSEID)
and NVL(A.FAUDITORID, ' ') <> ' '
and NVL(A.FIsInitBill, 0) = 0
and a.fid = r.fsrcobjectid(+)
and r.fdestobjectid = ib.fparentid(+)
and b.fmaterialid = ib.fmaterialid
and b.fassistpropertyid = ib.fassistpropertyid那么像上一段的多条件的left join在简写时,应该如何在where后边编写呢??
...全文
相关推荐
深入Oracle的left join中on和where的区别详解
本篇文章是对Oracle的left join中on和where的区别进行了详细的分析介绍,需要的朋友参考下
oracle中left join和right join的区别浅谈
oracle中left join和right join的区别浅谈,需要的朋友可以参考一下
oracle-join用法
oracle外连接(join)详解及详细实例,需要列子的可以看看。
left join 过滤条件写在on后面和写在where 后面的区别
left join 过滤条件写在on后面和写在where 后面的区别
oracle join on 数据过滤问题
代码如下:select a.f_username from ( SELECT /*+parallel(gu,4)*/distinct gu.f_username FROM t_base_succprouser gu where gu.f_expectenddate > (select trunc(sysdate,’Y’)FROM DUAL) and gu.f_lotid=1 and gu.f_playid=4 and gu.f_paymoney>=1500 ) A left join ( select from t_base_vip_customes and ((vu.f_passeddate


基础和管理
