数据库查询预览报空指针,查不到东西

SELECT m.branchid,
       m.prodid,
       m.lotno,
       m.customerid,
       m.INBOUNDQTY,
       m.billid,
       m.billingdate,
       j.costprice,
       j.costaccounting,
       k.storeinventory,
       j.costprice * k.storeinventory as storeamount,
       c.custno,
       c.custname,
       d.prodno,
       d.prodname,
       d.packageunit,
       d.manufacture,
       d.prodspecification,
       d. purchaser,
       d.busitypetext,
       r.pk,
       r.NOTICESUMID,
       r.NOTICEDETID,
       d.PURCHASECHANNAME
  from tb_gos_account_o_prodaccs m
 inner join (select t.branchid, t.PRODID, t.lotno, max(PK) as pk
               from tb_gos_account_o_prodaccs t
              where substr(billid, 4, 3) = 'JHA'
              GROUP BY branchid, PRODID, lotno) n
    on m.branchid = n.branchid
   and m.pk = n.pk
 inner join (select branchid,
                    prodid,
                    lotno,
                    sum(invbalqty) as storeinventory
               from SX_KH_lotinven
              where branchid = 'FWX'
                and to_char(createtime, 'yyyy-mm-dd') = '2019-03-01'
              group by branchid, prodid, lotno) k
    on m.prodid = k.prodid
   and m.lotno = k.lotno
   and m.branchid = k.branchid
 inner join tb_gos_account_o_braninven j
    on k.prodid = j.prodid
   and k.branchid = j.branchid
  left join vw_common_cust c
    on m.customerid = c.custid
   and m.branchid = c.branchid
  left join vw_common_prod d
    on m.prodid = d.prodid
   and m.branchid = d.branchid
  LEFT JOIN tb_gos_purchase_purstockinDET r
    on m.billid = r.billid
   and m.prodid = r.proid
   and m.lotno = r.lotno
 where k.storeinventory != 0
   and m.branchid = 'AWX'



PLSQL里可以查到数据


Arvinzk 发布于 2019-5-8 15:22
1min目标场景问卷 立即参与
回答问题
悬赏:4 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共1回答
最佳回答
0
尘埃。Lv2初级互助
发布于2019-5-8 15:27

确定了同样的语句在plsql能查到之后,就要检查


image.png


是不是你的连的户数库,如果数据可也没错,


咱就

image.png


换成“  ”双引号   

如果解决了您的问题,请及时采纳,系统会为您增加20信用分哦,...

另外小弟混口饭吃不容易,就指望你这个采纳呢...


  • 2关注人数
  • 272浏览人数
  • 最后回答于:2019-5-8 15:27
    请选择关闭问题的原因
    确定 取消
    返回顶部