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
523 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Your data is at risk. Probably more today that at any other time in history. There are simply more people with more access to the Web with bad intentions.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

617 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