Results 1 to 2 of 2

Thread: Sorted List

  1. #1
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default Sorted List

    Hey guys,

    If I have a two column database table, with one column having repetitive values, how would I query the table to present a list sorted by date like such:

    Let's say the columns are date and message (with date being repeated):

    Distict date
    All messages from that date

    Next distinct date
    all messages from this date

  2. #2
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default

    I'm confused. Wouldn't something like:
    Code:
    select * from tablename order by date desc
    work as well as a few other variations of said code? or are you wanting to do something different? I'm just saying I'm not sure what you are asking.

Bookmarks

Posting Permissions

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