Forum Replies Created

Viewing 15 posts - 466 through 480 (of 2,171 total)

  • RE: Multi Column Sort

    It doesn't matter where you start.

    You can, as you drive "downwards" the records, also drive "upwards" the records.

    I am thinking of an algorithm that picks an arbitrary record in the...

  • RE: Multi Column Sort

    john.arnott (4/9/2009)


    Peso,

    I'm not sure that I'm following your toll-booth analogy properly. I don't see how it fits with the data you posted as coming from the OP:

    ...

  • RE: Multi Column Sort

    Well, I have thought out a proper use-case.

    Think of the eight columns as a freeway with 8 lanes.

    All 8 lanes are always open.

    At the "end" of the freeway (starting from...

  • RE: Multi Column Sort

    I agree with most points, but I strongly disagree with creating sample data that fulfills OP's wanted output. I don't believe in some divine intervention that sample data is perfectly...

  • RE: Multi Column Sort

    I think that sample data is adjusted to OP needs.

    OP fourth post (first on second page) still doesn't answer the question of "3, NULL, 9" sample data. OP just rephrase...

  • RE: Multi Column Sort

    RBarryYoung (4/8/2009)


    Yes. I am contending that I have a correct understanding of the OPs intentions.

    Touché !

    🙂

  • RE: Multi Column Sort

    But isn't the CorrectSequence based on your understanding of OP's intention?

  • RE: Multi Column Sort

    All assumptions this far seem to be based on page 1 decimal sample data.

    That sample data is already sorted! OP writes "The question is how to sort unordered rows into...

  • RE: Multi Column Sort

    I don't get it?

    Why is that invalid sample data? Columns are ascending from left to right.

    What OP needs is an algorithm to sort the records.

    All assumptions this far is based...

  • RE: Multi Column Sort

    Chris, with the logic of the other Chris, how should this sample data be sorted?

    1 7 9

    NULL 6 ...

  • RE: Multi Column Sort

    Ramesh (4/8/2009)


    See these results, the row 5 should be followed after row 4 as the col2 value of row 5 is higher than that of row 4.

    -- Actual Results

    ID col1...

  • RE: Multi Column Sort

    Ramesh (4/8/2009)


    See these results, the row 5 should be followed after row 4 as the col2 value of row 5 is higher than that of row 4.

    -- Actual Results

    ID col1...

  • RE: Multi Column Sort

    For Number < 40000 I get these results

    Ramesh' Version : 2683 ms

    Peso : 1546 ms

  • RE: Multi Column Sort

    Same as before.

    And I am little suspicous about your algorithms. For both you and Chris all 6250 records in the final resultset are ordered by original ID.

    My suggestion are unordered...

  • RE: Multi Column Sort

    Using Ramesh's test cases, I get these timings:

    Ramesh' Version : 526 ms

    ChrisM' Version 3 ("condensed" version 2) : 23480 ms

    Peso : 236 ms

Viewing 15 posts - 466 through 480 (of 2,171 total)