Re: Newbie Question - Setting a report in descending order

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Mon, 06 Sep 1999 19:05:24 +0800
Message-ID: <37D39FF4.5547_at_yahoo.com>


Marcel de Valk wrote:
>
> I’m rather new to SQL and need some help with a problem I have setting a
> report in descending order.
>
> The problem is as follows:
> I have made a report using two tables. In this report I have put a field
> containing the multiplication of two columns from different tables. Now I
> want this report ordered in descending order by the result of this very
> multiplication.
>
> Can someone please help me with my problem.
>
> Thanking you in advance,
> Marcel de Valk

select col1, col2
from my_table
order by ( col3 * col4 + 10 ) desc

select col1, col2, col3 / 15
from my_table
order by 3 asc (ie same as order by col3/15)

etc etc

-- 
===========================================
Connor McDonald
"These views mine, no-one elses etc etc"
connor_mcdonald_at_yahoo.com

"Some days you're the pigeon, and some days you're the statue."
Received on Mon Sep 06 1999 - 13:05:24 CEST

Original text of this message