>I have a dilemna:
>I have a table of 10 character values
>example:
>0000000001
>0000000002
>0000000003
>0000000020
>
>I feed these values into a routine which takes
>the ALLTRIM(STR(VAL())) of these values. When I
>sort the resulting values, I get:
>1
>2
>20
>3
>
>I have to feed the routine with chars, so how can
>I index this table of values such that they are in
>numeric order?
>
>Thanks in advance,
>Jim Smith
Jim,
I would have thought you could simply index on the field as it is.
INDEX on charfield TAG charfield
Numerics will sort properly whether they're left padded with blanks or with '0's.
BTW, Always bad to use TRIM functions in index expressions unless they are padded out to a fixed width again.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only