Order by, Group by help

Results 1 to 3 of 3

Thread: Order by, Group by help

  1. #1
    Jason Guest

    Default Order by, Group by help

    I have a generated table that displays 6 Columns. I want each column heading to be a hyperlink that sorts by that particular heading. Here is the end of my existing Select statement:(its really long)<BR>....GROUP BY [Members].[MemberID], [Members].[FirstName], [Members].[LastName] Order by Members.LastName;"<BR>I tried this:<BR>if request.querystring("sortby") = " " then<BR>vSort = "Members.LastName"<BR>Else<BR>vSort = request.QueryString("sortby")<BR>End if<BR>And changed the Order by clause to :<BR>Order by &#039;" & vSort & "&#039;;"<BR><BR>This doesnt generate an error, but it doesnt print anything to screen when the hyperlink is clicked. Is the Group by statement going to need to be changed too? If so, to what?<BR><BR>Thanks<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Order by, Group by help

    They should be independent. I&#039;d guess some other bug.<BR><BR>You say you get *nothing*???<BR><BR>Have you Response.Write&#039;d the SQL query? The status of the Recordset after the query? (e.g., RS.EOF?)<BR><BR>How much debugging have you done? What does it tell you.<BR><BR>

  3. #3
    Jason Guest

    Default Duh

    Thanks bill. I realized that the initial request was from a post, and that the new request didnt include the initial parameters. It works now.

Posting Permissions

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