Sorting Record Sets

Results 1 to 6 of 6

Thread: Sorting Record Sets

  1. #1
    Mahesh N Guest

    Default Sorting Record Sets

    HI,<BR><BR>I have built a record set dynamically in an ASP page, with data from multiple tables. Is there a way that I can sort this record set on a particular column..????<BR><BR>Thanks,<BR>Mahesh.<BR>

  2. #2
    Richard's Guest

    Default RE: Sorting Record Sets

    Yep..Push the values into an array and sort it...In the mean while if I get any other ideas I will post it....<BR><BR>Happy Programming

  3. #3
    Ouija Guest

    Default Before you do that

    I&#039m not sure what you mean by multiple tables, and I am not an expert, but are you aware of the ORDER BY command for SQL?<BR><BR>Here&#039s a quick example, which may or may not help. This just sorts it in a certain order:<BR><BR>SQL_query = "SELECT * FROM MyTable Order By MyNumber Desc"<BR><BR>The Desc (which is for descending) can be changed to Asc for ascending.

  4. #4
    Richard's Guest

    Default You can't do that....Before you do that

    Hey...If the the data is from more than one table then the solution is only through arrays.. It it is from one table only then your sql statement is appropriate..<BR><BR>Happy Programming

  5. #5
    Richard A. Lowe Guest

    Default RE: You can't do that....Before you do that

    You can do ORDER BYs on JOINS and you can ORDER BY on UNIONs as well, so multiple tables are supported.<BR><BR>HTH,<BR>Richard

  6. #6
    Richard's Guest

    Default RE: You can't do that....Before you do that

    Hey..Thank you...I am sorry, I made a mistake.. I will remember that for the future..<BR><BR><BR><BR>Happy Programming

Posting Permissions

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