Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle Join Clause 1

Status
Not open for further replies.

Meleagant

Programmer
Aug 31, 2001
166
US
All,

I'm an experienced MS Sql developer and just started working with Oracle. Is there some funkiness with using the Join clause? I get the error "SQL Command not properly ended" when I try to execute:
Code:
Select *
From Session S
  Inner Join Finding F on F.Log_Key = S.Log_Key
We have a mixture of 10g & 8i databases here and this will run in the 8i databases and not in the 10g. As I said I am new to Oracle can anyone shed light on this for me?

Thanks
-- Joe --

Journeyman -- The Order of the Seekers of Truth and Penitence
 
Joe,

"Session" is an Oracle keyword. Just rename the table, adjust your query, and re-try. (By using the table name "SESSON", your code ran fine on my machine.)

Let us know your findings.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
Thanks, the actual table name was FIT_Session but I dropped the FIT part when I copied the sql over.

I did however find some of your older replies to posts where you said that the Inner/Left/Right Join keywords are not supported before the 9 version of Oracle. I must have gotten mixed up which databases of our are in which version. As a MS Sql developer I am so used to using Inner/Right/Left Joins and not using (+) in the Where clause.



Journeyman -- The Order of the Seekers of Truth and Penitence
 
Correct, Joe, Oracle's typical join code to accomplish what you want is:
Code:
select s.* from sesson s, finding f
 where  F.Log_Key = S.Log_Key;

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top