Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

order by

Status
Not open for further replies.

nelco

Programmer
Apr 4, 2006
93
US
I have a table which has several columns among which the column I am interested is called name. The rows for this column refers to people who have joint account and looks something as follows(firstperson/secondperson:

Nancy/Roy
Adam/Drew
Nancy/Roy
Nick/Jessica
Drew/Adam
Joe/Sam
Adam/Drew
Sam/Joe

I want to order the rows based on same joint account names (keeping in mind first and last names are same as last and first name. example: Adam/Drew and Drew/Adam):
Output should be as follows in order by clause

Adam/Drew
Adam/Drew
Drew/Adam
Joe/Sam
Sam/Joe
Nancy/Roy
Nancy/Roy
Nick/Jessica

Any help /logic will be appreciated
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top