Search code examples
sqloracle-databaseoracle10g

Simple SQL command not properly ended


I have the following query:

SELECT * 
FROM DELUSR.AGREEMENT AS agreement 
WHERE agreement.MASTER_AGGREMENT_ID = 4;

After trying to run it, I get this error:

Error code 933, SQL state 42000:
ORA-00933: SQL command not properly ended Line 1, column 1
Execution finished after 0 s, 1 error(s) occurred.

I am not sure how to decode this error message. The statement looks fine to me. Any insights into whats wrong with it?


Solution

  • Oracle accepts no AS for table aliases:

    SELECT * FROM DELUSR.AGREEMENT agreement WHERE agreement.MASTER_AGGREMENT_ID = 4;