Sorting Numbers...

  • Thread starter Lynn Pennington
  • Start date
L

Lynn Pennington

I have a report that I would like to sort on a number
field DESC.

I have tried sorting in the Query and the report and both
times the sort starts with NEGATIVE numbers.

(0.08)
54,888.90
47,323.83

What am I doing wrong?

Thanks,
Lynn
 
B

Bas Cost Budde

Lynn said:
I have a report that I would like to sort on a number
field DESC.

I have tried sorting in the Query and the report and both
times the sort starts with NEGATIVE numbers.

(0.08)
54,888.90
47,323.83

What am I doing wrong?
Nothing, really. Negative numbers are smaller than zero.

Or, if you really appreciate doing something wrong: it is in what you ask.

Try sorting on abs(yournumberfield)
 
L

Lynn Pennington

If I used ABS(number) then it would be

100.00
(99.25)
99.00
30.00
1.00

I am trying to sort the number in DESC order - the results
should be like this.

100.00
99.00
30.00
1.00
(99.25)

Any Ideas?
Thanks,
Lynn Pennington.
 
B

Bas Cost Budde

Lynn said:
If I used ABS(number) then it would be

100.00
(99.25)
99.00
30.00
1.00

I am trying to sort the number in DESC order - the results
should be like this.

100.00
99.00
30.00
1.00
(99.25)

Yea, ORDER BY Abs(number) DESC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top