Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> insane error?
Hi,
I'm trying to subquery a select statement to allow me to get the Nth 10 rows of a result set (I'm using Oracle 8.0.5 on Linux RH6 using PHP3). My original query looks like this (i've removed some of it, but I can assure you this is a valid query that returns the resultset I want):
SELECT headline.headline, headline.url, headline.grabtime
FROM headline, category, headline_category_link, section WHERE headline_category_link.headline = headline.id AND headline_category_link.category = category.id
:
:
AND category.sect = section.id ORDER BY grabtime DESC
and my new version of it, to just retrieve the first 10 rows, looks like this:
SELECT * FROM (
SELECT headline.headline, headline.url, headline.grabtime FROM headline, category, headline_category_link, section WHERE headline_category_link.headline = headline.id AND headline_category_link.category = category.id
:
:
AND category.sect = section.id ORDER BY grabtime DESC )
Now, this looks OK to me, but I get this error message when trying to execute it:
ORA-00907: missing right parenthesis
and I am absolutely stumped. What's wrong with the query. Is there a paranthesis missing? I can't see where. Or is there a better way to do this?
thanks,
![]() |
![]() |