Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TBSORT Sequence Question

Status
Not open for further replies.

agredell

Technical User
Oct 27, 2011
2
0
0
US
I'm not fully understanding how TBADD and TBSORT work. I created and loaded a table, only to find when I processed the table that it was in the reverse sequence of the order in which I loaded it. I added a "colno" key to the previous key (before it), and issued a TBSORT in my program. The order is alphabetically correct, but not numerically, i.e., "1, 10, 11, 12, 13, 14, ..., 19, 2, 20, 21...".

Is there a way to declare a variable numeric? Or a way to persuade TBADD to add AFTER the current position (that's how I thought it worked!).

Thanks!
 
Cancel that response, silly me, I looked more closely at the command and found the "N" attribute to add after the sort column! It's working fine now.
 
A related point is if you store, say date() values in one column and want to be able to sort on date. I used to do that by also having columns that I'd never display to a user, and keep a date("B") value in those. To sort by date I sorted the latter column.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top