Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: ORA-00907 : missing right parenthesis
jamesmgiordano_at_yahoo.com wrote in message news:<1101219173.539967.156610_at_c13g2000cwb.googlegroups.com>...
> I am using TOAD with Oracle 9i. Getting a weird error that I don't
> understand.
>
> Not sure why this error is coming up, but I have two tables that I am
> trying to run SQL on.
>
> select t1.table1_id,(select t2.created from table2 tr where
> t1.table1_id=t2.table1_id and rownum = 1
> order by t2.created) as created from table1 t1
>
> I am basically trying to get the newest record from my lookup table
> (table2) and return all rows from table1.
>
> If I change the word "order" to "group" it will work, but if I use
> "order" it complains. Does anyone have any ideas why?
> Thanks for any help you can give me,
> JJ
Go to tahiti.oracle.com and learn about group by and order by. Group by does not mean any particular ordering within each group. It might be easier to say if you posted the "complaint."
There is a readme for this group at
http://members.cox.net/oracleunix/readme-cdos.htm and some googling
might give an answer to your specific question, like
http://www.orafaq.net/kb/link.php?id=24 implies you need to move the
rownum.
jg
-- @home.com is bogus. http://www.signonsandiego.com/uniontrib/20041123/news_1b23oracle.htmlReceived on Tue Nov 23 2004 - 18:22:50 CST
![]() |
![]() |