Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: ORA-00907 : missing right parenthesis

Re: ORA-00907 : missing right parenthesis

From: Joel Garry <joel-garry_at_home.com>
Date: 23 Nov 2004 16:22:50 -0800
Message-ID: <91884734.0411231622.75e40b25@posting.google.com>


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.html
Received on Tue Nov 23 2004 - 18:22:50 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US