Simple join query giving ORA 00933 on Oracle8i Release 8.1.7.0.1

46 views Asked by At

Environment used -

Oracle8i Release 8.1.7.0.1
PL/SQL Release 8.1.7.0.0
TNS for Linux: Version 8.1.7.0.0
NLSRTL Version 3.4.1.0.0

Following simple query is giving me an error : ORA-00933:SQL command not properly ended

On SQL Developer 1.5.1 -

SELECT A.CLAIM_ID, B.SUBCLAIM_ID
FROM CLAIM3.TABLE_A  AS A
JOIN CLAIM3.TABLE_B AS B
ON A.CLAIM_ID = B.CLAIM_ID 
;
2

There are 2 answers

0
Jon Heller On BEST ANSWER

Oracle did not support the ANSI join syntax until version 9i. Also, Huy Ngo is correct that Oracle does not allow AS for table aliases. Try this code instead:

SELECT A.CLAIM_ID, B.SUBCLAIM_ID
  FROM CLAIM3.TABLE_A A, CLAIM3.TABLE_B B
 WHERE A.CLAIM_ID = B.CLAIM_ID;
3
RyLight On

Change your SQL query to this:

SELECT A.CLAIM_ID, B.SUBCLAIM_ID  
FROM CLAIM3.TABLE_A A  // No AS
JOIN CLAIM3.TABLE_B B  // No AS
ON A.CLAIM_ID = B.CLAIM_ID  
;