March 19th, 2004, 04:51 PM
When you mix columns and values returned from aggregate functions like Max() or Sum(), you must use a GROUP BY clause in your query. This is starting to get too complicated to explain across a forum...I'd recommend getting a good book on SQL because these sorts of things are fundamental to being able to pull the right data out of the database.
March 26th, 2004, 11:35 AM
I was able to finalize the query structure and am posting it here in case anyone else ever needs it:
select TO_CHAR(qmb_post.date_created,'MM/DD/YYYY HH24:MI') date_created
(select TO_CHAR( max( DATE_CREATED ) ,'MM/DD/YYYY HH24:MI' ) from QMB_POST a where a.QUESTION_id= qmb_post.post_id group by qmb_post.post_id) lastdate
where qmb_post.post_id = ...........