该语句中的无效关系运算符在哪里?

时间:2019-03-05 21:08:53

标签: sql

此语句中无效的关系运算符在哪里?

(SELECT (a.FIMSMGR.FRRGRNL_GRNT_YR) FROM  a.FIMSMGR.FRRGRNL
WHERE FIMSMGR.FRRGRNL_COAS_CODE = a.FIMSMGR.FRRGRNL_COAS_CODE  
AND  FIMSMGR.FRRGRNL_GRNT_CODE = a.FIMSMGR.FRRGRNL_GRNT_CODE  
AND  FIMSMGR.FRRGRNL_FUND_CODE = a.FIMSMGR.FRRGRNL_FUND_CODE  
AND  FIMSMGR.FRRGRNL_ORGN_CODE = a.FIMSMGR.FRRGRNL_ORGN_CODE  
AND  FIMSMGR.FRRGRNL_ACCT_CODE = a.FIMSMGR.FRRGRNL_ACCT_CODE  
AND  FIMSMGR.FRRGRNL_PROG_CODE = a.FIMSMGR.FRRGRNL_PROG_CODE  
AND  FIMSMGR.FRRGRNL_ACTV_CODE = a.FIMSMGR.FRRGRNL_ACTV_CODE  
AND  FIMSMGR.FRRGRNL_LOCN_CODE = a.FIMSMGR.FRRGRNL_LOCN_CODE)

1 个答案:

答案 0 :(得分:0)

如果我只是按where子句中使用的名称进行访问

,也许您需要加入我猜为FIMSMGRFRRGRNL的表
    (SELECT 
     (FIMSMGR.FRRGRNL_GRNT_YR) 
     FROM  FIMSMGR a, FRRGRNL b
        -- added
     WHERE 
    a.FRRGRNL_COAS_CODE = 
  b.FRRGRNL_COAS_CODE  
   AND  
   a.FRRGRNL_GRNT_CODE 
   = b.FRRGRNL_GRNT_CODE  
   AND  
    a.FRRGRNL_FUND_CODE = 
    b.FRRGRNL_FUND_CODE  
    AND  
    a.FRRGRNL_ORGN_CODE = 
    b.FRRGRNL_ORGN_CODE  
   AND  
   a.FRRGRNL_ACCT_CODE = 
   b.FRRGRNL_ACCT_CODE  
   AND  
   a.FRRGRNL_PROG_CODE = 
   b.FRRGRNL_PROG_CODE  
  AND  
  a.FRRGRNL_ACTV_CODE = 
   b.FRRGRNL_ACTV_CODE  
  AND  
 a.FRRGRNL_LOCN_CODE = 
 b.FRRGRNL_LOCN_CODE)