Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old April 9th, 2008, 10:18 AM
marge0513 marge0513 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 8 marge0513 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 4 m 30 sec
Reputation Power: 0
ORA-00905 Missing Keyword

Hi everyone, I am a newbie with Oracle and I am receiving ora-00905 missing keyword error.

Can anyone tell me what could possibly be wrong with this SQL statement?

Select
T1.*,
T2.*
From
Table1 T1 INNER JOIN
Table2 T2 On
T1.File_Name = T2.File_Name And
T1.Downloaded_Date = T2.Act_Date INNER JOIN
(Select
File_Name,
Max(DownLoaded_Date) as Max_Date
From
Table1
Group By
File_Name) as T3 On
T1.File_Name = T3.File_Name And
T1.Downloaded_Date = T3.Max_Date
Where
T1.File_Desc = 'LEVY'

I am trying to select the maximum dates from 2 different tables and I am using Oracle 10.

Any help would be greatly appreciated. Thanks!!

Reply With Quote
  #2  
Old April 9th, 2008, 10:35 AM
shammat shammat is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2003
Location: Munich, Bavaria
Posts: 969 shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level)shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level)shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level)shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level)shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level)shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level)shammat User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 17 h 27 m 16 sec
Reputation Power: 57
Oracle does not allow a table alias with AS. Try to leave out the AS for the inline view:

(Select File_Name, Max(DownLoaded_Date) as Max_Date From Table1 Group By File_Name) T3

Reply With Quote
  #3  
Old April 9th, 2008, 10:38 AM
marge0513 marge0513 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2008
Posts: 8 marge0513 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 4 m 30 sec
Reputation Power: 0
Works beautiful!!!!!!!!!

Thank you so much!!

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > ORA-00905 Missing Keyword


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway