My Oracle DBA here suggests this:

SELECT     Items.ItemID, Items.Name, Items.LastModified,
                Viewed.UserID, Viewed.LastViewedDate
FROM       Items LEFT OUTER JOIN Viewed 
                ON Items.ItemID = Viewed.ItemID
WHERE Viewed.UserID = 1 
        and (Viewed.LastViewedDate < Items.LastModified or
Viewed.LastViewedDate is null )
ORDER   BY Items.ItemID

(Note it is completely untested)

__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
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