一个简单的脚本错误

qq_36934345 2017-05-21 12:05:24


select B.GSJGH,nvl(b.sfzh,b.jbxx_zjhm) as sfzh,b.bzjgmc,b.jbxx_sskhq,b.khxm, b.jbxx_xb,b.jbxx_nl,b.jbxx_khjb,c.WH_KHJLXM,a.jydm,a.jymc,a.cq,a.khrq,a.jyrq,a.dqrq,a.jyje,c.jd_dz from
(select a.*,b.*,c.* from
lsb_ls a,
hxb_and_hzb b,
jt_jbxxb c
where (case when b.jydm in('010203','010503','010606','020131','700204','020613')
then -b.jyje
else b.jyje
end)
where nvl(b.sfzh,b.jbxx_zjhm)=c.jd_zjhm(+) and nvl(b.sfzh,b.jbxx_zjhm)=a.sfzh(+)
and b.gsjgh='56234585'
and (substr(a.jysj,1,10)>='2017-04-15' and substr(a.jysj,1,10)<='2017-05-15')
and jymc is not null;



‘’where nvl(b.sfzh,b.jbxx_zjhm)=c.jd_zjhm(+) and nvl(b.sfzh,b.jbxx_zjhm)=a.sfzh(+) ‘ 这句报无效的关系运算符,
...全文
147 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
卖水果的net 2017-05-21
  • 打赏
  • 举报
回复
(select a.*,b.*,c.* from lsb_ls a,hxb_and_hzb b,jt_jbxxb c where ( case when b.jydm in('010203','010503','010606','020131','700204','020613') then -b.jyje else b.jyje end ) ) where 条件,没写完整。
  • 打赏
  • 举报
回复
select B.GSJGH,nvl(b.sfzh,b.jbxx_zjhm) as sfzh,b.bzjgmc,b.jbxx_sskhq,b.khxm, b.jbxx_xb,b.jbxx_nl,b.jbxx_khjb,c.WH_KHJLXM,a.jydm,a.jymc,a.cq,a.khrq,a.jyrq,a.dqrq,a.jyje,c.jd_dz from (select a.*,b.*,c.* from lsb_ls a,hxb_and_hzb b,jt_jbxxb c where ( case when b.jydm in('010203','010503','010606','020131','700204','020613') then -b.jyje else b.jyje end ) ) where nvl(b.sfzh,b.jbxx_zjhm)=c.jd_zjhm(+) and nvl(b.sfzh,b.jbxx_zjhm)=a.sfzh(+) and b.gsjgh='56234585' and (substr(a.jysj,1,10)>='2017-04-15' and substr(a.jysj,1,10)<='2017-05-15') and jymc is not null; 子查询中少个括号 ,别的不知道了。

17,082

社区成员

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

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