Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/74.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何调试此SQL查询?_Sql_Oracle Sqldeveloper_Identifier - Fatal编程技术网

如何调试此SQL查询?

如何调试此SQL查询?,sql,oracle-sqldeveloper,identifier,Sql,Oracle Sqldeveloper,Identifier,我有一个很大的SQL查询,这给我带来了一些麻烦。以下是查询: -- Invoice-to SELECT hzp.party_number customer_number , hzp.party_name customer_name , hzp.party_type , hzp.address1 , hzp.address2 , hzp.address3 , hzp.address4 , hzp

我有一个很大的SQL查询,这给我带来了一些麻烦。以下是查询:

-- Invoice-to
SELECT hzp.party_number customer_number
     , hzp.party_name   customer_name
     , hzp.party_type
     , hzp.address1
     , hzp.address2               
     , hzp.address3
     , hzp.address4
     , hzp.city
     , hzp.postal_code
     , hzp.state
     , hzp.country
     , hzp.status
     , hzps.party_site_number
     , hzac.account_number
     , hzac.account_name
     , site.site_use_code
     , rct.remit_to_address_id
FROM hz_parties hzp
LEFT OUTER JOIN hz_party_sites hzps ON hzps.party_id = hzp.party_id
LEFT OUTER JOIN hz_cust_accounts hzac ON hzac.party_id = hzp.party_id
LEFT OUTER JOIN hz_locations hzl ON hzl.location_id = hzps.location_id
LEFT OUTER JOIN hz_cust_acct_sites_all acct ON acct.party_site_id = hzps.party_site_id 
  /*LEFT OUTER                               */  --AND acct.cust_account_id = hzac.cust_account_id
LEFT OUTER JOIN hz_cust_site_uses_all site ON site.cust_acct_site_id = acct.cust_acct_site_id
                                          AND site.site_use_code = 'BILL_TO' /* site was hcsu? */
LEFT OUTER JOIN ra_customer_trx_all rct ON rct.remit_to_address_id = acct.remit_to_address_id
;
--checked , had an erro
我得到一个错误:

Error at Command Line:27 Column:70
Error report:
SQL Error: ORA-00904: "ACCT"."REMIT_TO_ADDRESS_ID": invalid identifier
00904. 00000 -  "%s: invalid identifier"

我查找了无效的ID,但它不能帮助我理解它的逻辑。感谢您提供的任何提示

表hz\U cust\U acct\U sites\U是否都有一个名为“汇款地址”的列?错误消息表明它没有。@DanBracuk-True,它没有该列。啊,好吧,让我看看我能不能弄明白。谢谢