How to sort column by absolute value in SQL Server or Microsoft Access?
ms-access, sorting, sql-server
Solution
In MSSQL:
Use the `ABS()` function on the column you want to sort. ie:
`SELECT a, ABS(b) FROM tbl ORDER BY ABS(b)`
Problem
The values in a column has both negative and positive integers. I want to sort the column by its absolute value. How do I do this preferably in Access or in SQL? Thanks.