Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Sorting on part of expr descending
Miscellaneous
Thread ID:
01640823
Message ID:
01640823
Views:
82
Hi,

I need to sort report on 3 fields:

FIELD1 + UNIT_PRICE + FIELD2

FIELD1 and FIELD2 are CHAR types. UNIT_PRICE is DECIMAL

The key is that the sort on UNIT_PRICE would be descending. That is, the higher number appearing at the top. I tried the following:
FIELD1 + STR(1000000 - UNIT_PRICE,10,2) + FIELD2
But it does not seem to work. Or does not work all the time. What am I doing wrong?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Next
Reply
Map
View