Reputation: 1
While execute below Query , its executed successfully.
But when execute only (SELECT CREDITDOCUMENTID FROM TBLTPAYMENT ) it is give error like "00904. 00000 - "%s: invalid identifier"".
Doesn't know how its work in oracle 12c database.
SELECT *
FROM TBLTCREDITCREDITDOCUMENTREL
WHERE CREDITDOCUMENTID IN
(SELECT CREDITDOCUMENTID
FROM TBLTCREDITDOCUMENT
WHERE CREDITDOCUMENTID IN
(SELECT CREDITDOCUMENTID FROM TBLTPAYMENT )
);
Upvotes: 0
Views: 34
Reputation: 220987
An educated guess (and I'm betting on it) would be that your column CREDITDOCUMENTID
is not a column from the TBLTPAYMENT
table, but from some other table that is in scope, e.g. in TBLTCREDITDOCUMENT
. This is easy to check. Try running this query:
SELECT *
FROM TBLTCREDITCREDITDOCUMENTREL
WHERE CREDITDOCUMENTID IN
(SELECT CREDITDOCUMENTID
FROM TBLTCREDITDOCUMENT
WHERE CREDITDOCUMENTID IN
(SELECT TBLTPAYMENT.CREDITDOCUMENTID FROM TBLTPAYMENT)
);
In case of which you qualify the TBLTPAYMENT.CREDITDOCUMENTID
column. You'll get the same error as when you run the inner-most SELECT
by itself.
Upvotes: 2