Reputation: 423
Unable to determine why this query is causing an exception. any help is appreciated.
ORA-00933: SQL command not properly ended
SELECT COUNT(sd.URI) AS OrchCount FROM SDETAIL AS sd, ORCH_ASSOC AS orch WHERE sd.uri=orch.OPERATION_ AND sd.LEVEL='OrchA'
SELECT COUNT(SDETAIL.URI) AS OrchCount FROM SDETAIL WHERE SDETAIL.URI=ORCH_ASSOC.OPERATION_ AND SDETAIL.COMPONENTLEVEL='OrchA'
ORA-00904: "ORCH_ASSOC"."OPERATION_": invalid identifier
Upvotes: 0
Views: 184
Reputation: 26343
@clav is right about the ORA-00904. As for the ORA-00933, that's because you did this:
... FROM SDETAIL AS sd
Do this instead (no "as"):
... FROM SDETAIL sd
Upvotes: 0
Reputation: 7169
The AS
keyword is only used in assigning column aliases, not tables:
FROM SDETAIL AS sd, ORCH_ASSOC AS orch
You can leave out AS
and it should work fine:
FROM SDETAIL sd, ORCH_ASSOC orch
Upvotes: 0