Re: Nested SELECT
Actually, you appear to be missing one brace, and have two extras:
<pre>
SELECT DISTINCT YEAR(content.date)
FROM content
WHERE (
(
(
YEAR( content.date )
) IS NOT null
)
)
AND YEAR( content.date ) <
(
SELECT YEAR
(
MAX ( content.date )
)
<-- missing parens
FROM content
) <-- extra parens
) <-- extra parents
ORDER BY YEAR(content.date) DESC
================================================================================
SELECT DISTINCT YEAR( `date` )
FROM content
WHERE YEAR( `date` ) IS NOT null
AND YEAR( `date` ) <
(
SELECT YEAR
(
MAX ( `date` )
)
)
FROM content
ORDER BY YEAR( `date` ) DESC
</pre>
http://prestonm.com ...
http://www.mcmurry.com
Subject
Written By
Posted
Re: Nested SELECT
April 12, 2005 01:56PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.