Subject: LEFT JOIN syntax
Posted By: 12th_Man Post Date: 6/25/2003 11:45:14 AM
Hello-

I'm used to using MSSQL, but I'm now working on an Oracle system.  I need to use a Left outter join for a query I'm writting, but I am getting a syntax error that I don't know how to fix.  Please let me know if you see a blatant problem with this FROM clause.

FROM rss_user LEFT JOIN ent_user ON rss_user.user_id = ent_user.user_id

I get a "ORA-00933: SQL command not properly ended" error on the word JOIN.

Thanks in advance,
Mike
Reply By: ben_knieff Reply Date: 6/29/2003 7:55:04 PM
Mike-
It looks like we're both in the same boat. I've spent all weekend learning about Oracle and had the exact same question as I am trying to port code form SQL Server 2K to Oracle 8i/9i.
Instead of defining the join in the FROM clause, you comma delimit the tables and join them in the where clause to get a left join I think it looks like this (I'm new)
WHERE table1.field (+) = table2.field
You might need to move the (+).
HTH

Reply By: jlnashrod Reply Date: 10/27/2003 8:23:01 PM
yes, you can use some thing like this
field_name1 (+) = field_name2 or
field_name1 = field_name2 (+)


Go to topic 5640

Return to index page 1018
Return to index page 1017
Return to index page 1016
Return to index page 1015
Return to index page 1014
Return to index page 1013
Return to index page 1012
Return to index page 1011
Return to index page 1010
Return to index page 1009