Re: INNER JOIN

From: Hans Forbrich <forbrich_at_yahoo.net>
Date: Sun, 28 Dec 2003 15:28:57 GMT
Message-ID: <3FEEF654.9A843AD2_at_yahoo.net>


Barry Young wrote:
>
> Hello Hans,
>
> Here is an example statement:
>
> SELECT Table1.StartDate, Table2.Description
> FROM Table1 INNER JOIN Table2 ON Table1.ID = Table2.ID;
>
> INNER JOIN is what is giving me the ORA 933 SQL command not properly ended.
>
> This is just a piece of the code.. In the final statement there will be
> NESTED INNER JOINS.. So I may have to do Unions??
>
> Any help would be appreciated.
>
> Thanks!

Try eliminating the semi-colon. SQL statements themselves do not use a semi-colon. However many of the languages/environments that call SQL do need a 'statement terminator' and many of those use a semi-colon. In many cases (eg: cut & paste) will accidently include the semi-colon as part of the SQL statement instead of an environment statement terminator.

Also note that the 'new' ANSI syntax (INNER JOIN, NATURAL JOIN, etc.) is only supported when dealing with Oracle9i and higher. If you are going against an older version (Oracle8i, Oracle8, Oracle 7) then you need to fall back to the old syntax which would be

SELECT Table1.StartDate, Table2.Description   FROM Table1, Table2
 WHERE Table1.ID = Table2.ID; Received on Sun Dec 28 2003 - 16:28:57 CET

Original text of this message