Viewing 15 posts - 466 through 480 (of 2,171 total)
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...
April 10, 2009 at 5:46 am
john.arnott (4/9/2009)
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:
...
April 9, 2009 at 11:59 pm
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...
April 9, 2009 at 11:57 am
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...
April 8, 2009 at 1:38 pm
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...
April 8, 2009 at 12:36 pm
RBarryYoung (4/8/2009)
Yes. I am contending that I have a correct understanding of the OPs intentions.
Touché !
🙂
April 8, 2009 at 12:29 pm
But isn't the CorrectSequence based on your understanding of OP's intention?
April 8, 2009 at 12:24 pm
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...
April 8, 2009 at 11:59 am
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...
April 8, 2009 at 11:49 am
Chris, with the logic of the other Chris, how should this sample data be sorted?
1 7 9
NULL 6 ...
April 8, 2009 at 10:41 am
Ramesh (4/8/2009)
-- Actual Results
ID col1...
April 8, 2009 at 8:22 am
Ramesh (4/8/2009)
-- Actual Results
ID col1...
April 8, 2009 at 8:15 am
For Number < 40000 I get these results
Ramesh' Version : 2683 ms
Peso : 1546 ms
April 8, 2009 at 7:57 am
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...
April 8, 2009 at 7:52 am
Using Ramesh's test cases, I get these timings:
Ramesh' Version : 526 ms
ChrisM' Version 3 ("condensed" version 2) : 23480 ms
Peso : 236 ms
April 8, 2009 at 7:23 am
Viewing 15 posts - 466 through 480 (of 2,171 total)