Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004
    Posts
    124

    Unanswered: query by recent dates

    How would I construct a SQL statement that would query the database and return the 5 most recent dates added into the database?

    Would I use the TOP SQL keyword to select the 5 most recent entries?

    How would I query for the most recent dates?

    SELECT TOP 5 *
    FROM dbo.tblWeblog
    WHERE blogDate = ?

    Thanks for any help!
    -Dman100-

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Close! I'd use:
    Code:
    SELECT TOP 5 *
       FROM dbo.tblWeblog
       ORDER BY blogDate DESC
    -PatP

  3. #3
    Join Date
    Jan 2004
    Posts
    124
    Thanks Pat!
    -Dman100-

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •