If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > order by 2 columns

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-21-06, 08:17
Td04 Td04 is offline
Registered User
 
Join Date: Mar 2004
Posts: 52
Question order by 2 columns

I try to order by fírst one recordset lastname and then by firstname
so it will be sth like:
Andersson Andrews
Andersson Bartholomew
Baskerton Anders
Bollinger Anders

Could this be done without multidimentional arrays sorting?

try something like this..
Code:
SQL = "SELECT ID as poster, LASTNAME,FIRSTNAME as poster1 _
FROM "&strTabell&" where LASTNAME like '"& u_letter &"%' order by poster1" 


'then later looping
x = 0
do while not rs.eof
%>
<option value="<%=rs("poster")%>"><%=rs("poster1")%></option>
<%
rs.movenext
x=x+1
loop
rs.close
cn.close
__________________
"Never underestimate a large number of morons"
Reply With Quote
  #2 (permalink)  
Old 02-22-06, 05:51
mylove mylove is offline
Registered User
 
Join Date: Jan 2006
Posts: 5
order by poster1,poster2,poster3

order by poster3,poster2 ,poster1

Like This
Reply With Quote
  #3 (permalink)  
Old 02-22-06, 07:35
Td04 Td04 is offline
Registered User
 
Join Date: Mar 2004
Posts: 52
aha it was that easy! :-)
Thanks!
__________________
"Never underestimate a large number of morons"
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On