• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

order by date_arrive but what if...

 
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Assuming I have a table with the following attributes:

Name date arrive


Say, for example, I have the following information � they are ordered by date

Name date arrive
Dan 1-feb-2005
James 5-feb-2005
Gore 6-feb-2005

Now, say Gil comes on 6-feb-2005 so the result will be:

Name date arrive
Dan 1-feb-2005
James 5-feb-2005
Gore 6-feb-2005
Gil 6-feb-2005

What if I want Gil to come before Gore (they are on the same date BUT Gil is before GORE � in the alphabetic order)

Does anyone have idea what the SQL Statement to be?

I have

Select Name, Date_Arrive from myTable order by Date_Arrive
 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can sort by more than one column:

Select Name, Date_Arrive from myTable order by Date_Arrive, Name
 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks this solves the problem
 
Time flies like an arrow. Fruit flies like a banana. Steve flies like a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic