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
515 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
Comment Utility
SELECT *
FROM SomeTable
ORDER BY Abs(SomeColumn) ASC
0
 
LVL 26

Expert Comment

by:jerryb30
Comment Utility
Order by abs(yourValue) ascending
0
 

Author Comment

by:NLGroup
Comment Utility
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
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
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.
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 …
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

763 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now