Page 2 of 2 First 12
  • Jump to page:
    #16
  1. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,275
    Rep Power
    968
    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.
  2. #17
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    40
    Rep Power
    11
    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

    from qmb_post

    where qmb_post.post_id = ...........
Page 2 of 2 First 12
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo