Tyler Silcox wrote:
> 
> This one only returns 3 records (and they are not ordered by DatePosted like I want, 
>wah-wah)

How about some parenthesis?

<cfquery name="getLatestNewsToo">
   (

         SELECT TOP 3 PressRelease_id AS Record_id, DatePosted, 
DateWritten, Title, NULL AS Publication, 1 AS IsPressRelease, 0 AS 
IsArticle
         FROM PressReleases
         WHERE IsFeatured != 1
     UNION ALL
         SELECT TOP 3 Article_id AS Record_id, DatePosted, DateWritten, 
Title, Publication, 0 AS IsPressRelease, 1 AS IsArticle
         FROM Articles
         WHERE IsFeatured != 1
   )
ORDER BY DatePosted DESC
</cfquery>

Jochem

______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to