Support 805.461.7300
Our Technology. Your Success.

Sorting a Number in a Character Field

Description

This command will allow you to sort the numbers in a character field. Ordinarily if you have sequence numbers in a character type field, the numbers that begin with a 1 (1, 10, 115, 1000, etc) will all appear before records that begin with a 2, which would make sorting pointless. This command puts the numbers in a character type field in a correct numeric sequence.

The Command At Work

Before Command After Command
Before Command
After Command

The Command

Copy this command, then paste it into the large text area of the command window:

INDEX ON VAL(cnumber) TAG cnumber

In this command, the cnumber field represents the field that you'd like to sort by. Replace cnumber with your actual field name. After clicking RUN, close the Command window then pull down the Select menu to Show All. You'll notice the field is properly sorted. Also, when you choose ...By Other from the Sort menu, you'll notice cnumber (or whatever word you added after TAG in the command) will appear as an index. Any time you choose to sort by that index, your list will be put in numeric sequence by that field.

« Back to Commands

I am especially motivated to take time to draw attention to Vince. In two instances, we potentially faced loss of product – significant loss, but thanks to everyone’s efforts, most notably Vince’s, we ended up with minor re-work and zero loss of stock. He’s patient and thorough, knowledgeable and resourceful. And he’s patient – A Big Plus when dealing with me. Long story short, the guy was able to not only produce a solution, but to prove to me the veracity of it. I hung up the phone saving thousands of dollars in catalog stock, not lost but salvaged, and my department had to spend just a wee bit of time on job re-work (which I was happy to do, all things considered). But I also hung up with a peculiar urge to write about Vince, incongruent as that may be since I rarely am moved to write letters of this sort. So… In a time of crisis, Vince was a terrific asset and ally. If I were his boss, I’d attempt a merit raise authorization, he was that exceptional.
H.D., Shawnee Mission, KS