Oracle无效标识符错误7

时间:2015-11-19 21:12:34

标签: sql oracle

我已经查看过之前提出的多个问题,但它们似乎无法解决我的问题。我通过以下代码继续收到无效的标识符错误:

SELECT C.VENDOR_ID, C.VENDOR_SITE_ID, C.AMOUNT, I.AMOUNT AS LINE_AMOUNT, C.BANK_AMOUNT_ID, C.BANK_ACCOUNT_NAME, 
    C.CHECK_DATE, C.CHECK_ID, C.CHECK_NUMBER, C.CURRENCY_CODE, C.PAYMENT_METHOD_LOOKUP_CODE, C.PAYMENT_TYPE_FLAG, 
    C.CHECKRUN_NAME, C.STATUS_LOOKUP_CODE, C.CLEARED_AMOUNT, C.CLEARED_DATE, C.CLEARED_BASE_AMOUNT, 
    C.CLEARED_EXCHANGE_RATE, C.CLEARED_EXCHANGE_DATE, C.EXCHANGE_RATE, C.EXCHANGE_DATE, C.CE_BANK_ACCT_USE_ID, 
    C.PAYMENT_METHOD_CODE, C.PARTY_ID, C.PARTY_SITE_ID, C.PAYMENT_DOCUMENT_ID, C.REMIT_TO_SUPPLIER_NAME, C.REMIT_TO_SUPPLIER_ID, 
    C.REMIT_TO_SUPPLIER_SITE_ID, I.INVOICE_ID, I.INVOICE_PAYMENT_ID, I.PERIOD_NAME, I.INVOICE_BASE_AMOUNT, I.PAYMENT_BASE_AMOUNT, 
    I.REVERSAL_FLAG, I.REVERSAL_INV_PMT_ID, S.ADDRESS_LINE1, S.ADDRESS_LINE_ALT, S.ADDRESS_LINE2, S.ADDRESS_LINE3, S.CITY, 
    S.STATE, S.ZIP, S.PROVINCE, S.COUNTRY 
FROM AP_CHECKS_ALL C
JOIN AP_INVOICE_PAYMENTS_ALL I
ON C.CHECK_ID = I.CHECK_ID
JOIN AP_SUPPLIER_SITES_ALL S
ON C.VENDOR_SITE_ID = S.VENDOR_SITE_ID AND C.VENDOR_ID = S.VENDOR_ID

1 个答案:

答案 0 :(得分:1)

检查您的列名称。它是ADDRESS_LINES_ALT,而不是ADDRESS_LINE_ALT

一般来说,当您尝试从不包含该列的表中选择列时,您将获得ORA-00904: invalid identifier。例如,

SELECT not_dummy FROM DUAL;

>>> ORA-00904: "NOT_DUMMY": invalid identifier