Solved

Sorting sorting numbrer so that they are put in numerical order regardless if they are positive or negative numbers.

Posted on 2008-10-07
4
520 Views
Last Modified: 2013-11-15
I have a column of numbers in a table (Acess 2003) that I need to sort in order by the number itself ingoring the positive or negative factor
example

52.00
(16.58)
(3.00)
15.00

the results would put the numbers in the  following order
(3.00)
15.00
(16.58)
52.00

Any idea how to do this.





0
Comment
Question by:NLGroup
  • 2
4 Comments
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 22662960
SELECT *
FROM SomeTable
ORDER BY Abs(SomeColumn) ASC
0
 
LVL 26

Expert Comment

by:jerryb30
ID: 22662965
Order by abs(yourValue) ascending
0
 

Author Comment

by:NLGroup
ID: 22663052
Sorry I forgot to mention that it needs to keep the positive and negative features of the numbers as well.

0
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 250 total points
ID: 22663087
NLGroup said:
>>Sorry I forgot to mention that it needs to keep the positive and negative features of the numbers as well.

Both of our suggestions do that.  They really are the same suggestion, when you get down to it...
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question