select b.custname,a.svcnum,b.custcertaddr,case length(custcertno) when 18 then 109-substr(custcertno,9,2) when 15 then 109-substr(custcertno,7,2) else custcertno end,
a.brandid,b.crtdate,b.SvcOrgCode,c.custmgr from info.T_CI_UserInfo_d a,info.T_CI_CustInfo_d b,info.t_CI_CustExtInfo_d c
where a.svcnum='15805547282' and a.attachcustid=b.custid and a.attachcustid=c.custid单独运行每一个数据库时都不会出错,每一个表和字段都是存在的,但是一起跑却提示表不存在,这个是什么原因啊?谢谢了,是在一个数据库中的。

解决方案 »

  1.   

    表的Owner是不是你的登录用户?
      

  2.   

    检查现在登陆的用户是否有权限访问这个表..
    ------------------------------------------------------------------------------
    Blog: http://blog.csdn.net/tianlesoftware
    网上资源: http://tianlesoftware.download.csdn.net
    相关视频:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx
    Q Q 群:62697716 
      

  3.   

    我看到你在表名的前面已经加上了用户名info了 
    那么可能是权限的问题
    检查一下当前登录执行这条语句的用户是否有查询相应表的权限还有 你在问题中说到了每一个数据库
    可最后又说这些表在同一个数据库中
    如果在不同的数据库中是要加@的
      

  4.   

    select b.custname,a.svcnum,b.custcertaddr,
    case length(custcertno) 
    when 18 then 109-substr(custcertno,9,2) 
    when 15 then 109-substr(custcertno,7,2) 
    else custcertno end, 
    a.brandid,b.crtdate,b.SvcOrgCode,c.custmgr 
    from info.T_CI_UserInfo_d a,info.T_CI_CustInfo_d b,info.t_CI_CustExtInfo_d c 
    where a.svcnum='15805547282' and 
    a.attachcustid=b.custid and 
    a.attachcustid=c.custid;检查一下当前用户是否有操作info用户下的T_CI_UserInfo_d,T_CI_CustInfo_d
    ,t_CI_CustExtInfo_d表的权限。如果当前执行sql的用户没有操作上述三表的权限,
    那么即使你在表前边添加了info用户名也没有用。