Sorting Records Efficiently

Results 1 to 2 of 2

Thread: Sorting Records Efficiently

  1. #1
    Jason Guest

    Default Sorting Records Efficiently

    I need to display a table of information retrieved from a db by date - most recent to latest. Each record will have a number that will be in one of the fields in the table. For my calculation, I need to retrieve the 10 lowest numbers from the first 20 records in the table. I also need to visually indicate (with an asterisk) the ten lowest numbers. Retrieving the records and sorting by date is the simple part. What is the most efficient way to grab the ten lowest and flag them?<BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: Sorting Records Efficiently

    Can you use some sort of record count to determine the first 10?<BR><BR>If Record.Count &#060; 10 Then <BR>sFieldAsterisk = on<BR><BR>Then on the part you are doing the reporting.<BR>You would do<BR><BR>If sFieldAsterisk = on Then<BR>Response.Write "*"<BR>End If<BR><BR>

Posting Permissions

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