Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    52

    Question Unanswered: 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"

  2. #2
    Join Date
    Jan 2006
    Posts
    5
    order by poster1,poster2,poster3

    order by poster3,poster2 ,poster1

    Like This

  3. #3
    Join Date
    Mar 2004
    Posts
    52
    aha it was that easy! :-)
    Thanks!
    "Never underestimate a large number of morons"

Posting Permissions

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