| View previous topic :: View next topic |
| Author |
Message |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Thu Feb 05, 2004 6:28 pm Post subject: [resolved] Sort within a sort (within a sort (etc.)) |
|
|
I am having a big problem and my brain hurts!
I have data and I want to sort a colum then sort by another column while keeping the first colum still sorted. In effect sorting within a sort. Does anyone have an idea or code on how to do this. Here is exactily what I want to do.
This is an entry in a log:
2531.023,02/05/2004,10:45 AM,dyost,11,Billable,B & W,Bond,30x42,1,Transportation,
There are MANY entries like this in the file. I need to sort column 1 then within that sort by column 9 then within that by 10.
Any help would be very.....well....helpfull!!
Thanks Much! _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Thu Feb 05, 2004 6:46 pm Post subject: |
|
|
Well, It's not that easy. I was hoping someone had already done this. I am pulling my hair out. I am on a tight deadline.  _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
jwfv Valued Contributor

Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
Posted: Thu Feb 05, 2004 7:14 pm Post subject: |
|
|
Some time ago, I found a utility called TextTools. They are just a collection of command-line utilities for manipulating text data files. I tested them out and they were blindingly fast and seemed handy, but I never had a use for them.
In your case, you could output your list to a file with values separated by whichever character you like. Then invoke the sorting utility (which will sort by as many columns as you like) and then bring the output file back in - voila - your multiple-sorted list.
Here is the main page:
http://home.online.no/~runeberg/tt/tthome.htm
and here is the specific utility I'm talking about:
http://home.online.no/~runeberg/tt/tsort.htm
I always thought these would work very well with VDS since they both can use character-delimited data files.
Hope it is helpful - _________________ Joe Floyd |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Thu Feb 05, 2004 7:22 pm Post subject: |
|
|
Where do I DL it? I can't find a link.  _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
|
| Back to top |
|
 |
jwfv Valued Contributor

Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
|
| Back to top |
|
 |
jwfv Valued Contributor

Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
|
| Back to top |
|
 |
jwfv Valued Contributor

Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
Posted: Thu Feb 05, 2004 7:29 pm Post subject: |
|
|
Just saw your message - hope it works. Let me know if it does, I'll be interested. Might have a use for it myself sometime. _________________ Joe Floyd |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Thu Feb 05, 2004 7:32 pm Post subject: |
|
|
I'll let you know, cause if it doesn't, I gotta keep looking. _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
jwfv Valued Contributor

Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
Posted: Thu Feb 12, 2004 3:37 pm Post subject: |
|
|
Did you ever get a chance to try this out? How did it work? _________________ Joe Floyd |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Thu Feb 12, 2004 3:41 pm Post subject: |
|
|
Sorry, Yes it works very nicely for my application. Thanks again. _________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
|