Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Sorting a resultset within the same SELECT statement

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-07-16 : 18:06:02
IceEyes writes "I have a table that's made of several REAL number columns. Each column has approx. 20 rows of data. Table is similar to below:

Column1  Column2  Column3
------- ------- -------
-1.0 2.2 -2.0
3.0 1.0 -1.1

What I want is to sum up each column seperately,

2.0 3.2 -3.1

and then sort them from max. to min. value in the resultset as:

Column2 Column1 Column3
------- ------- -------
3.2 2.0 -3.1



How will I do this?

Thanks for recommendations and answers."
   

- Advertisement -