Sort on alpha field.

bmwisme

New Member
Without adding an additional field to the schema of our Syteline (5.0.20) ERP application (Progress 9.1a), I would like to sort a table (item master) by the character field (item). Management would like to pad the field with preceeding zeros to get the sort to their liking - I am fighting tooth and nail!

Current sort order:
4111
411

Pad with zeros will produce (don't want to do):
0411
4111

Does anyone know if I can use the RECNO to sort my queries? I control the item number entry so 411 would always be before 4111.

Thanks in advance...

Bill
 

mra

Junior???? Member
I'm not shure if this is what you're after, but!!!


If you're that the field will only contain integers, why not sort by integer( <field> )?

Regards
Mike
 

bmwisme

New Member
Sort on Alpha...

The item number will be alpha/numeric. I have sorted on character fields in FoxPro but Progress seems to lack the necessary functions to handle the mixture of letters and numbers.

Bill
 

mra

Junior???? Member
If you mean, sorting an alphabetic field numericly then yes. How about creating a temporary table with a sort-field. Fill the fields using 4GL, and then sort by sort-field.

You can sort by rowid( table-name ), but are you shure you have comlete control over inserts/deletes? And what about backup/restore, they'll most likely reset your rowid numbers.

Regards
Mike
 
Top