Re: [SQL] calculating percentages - Mailing list pgsql-sql

From D'Arcy" "J.M." Cain
Subject Re: [SQL] calculating percentages
Date
Msg-id m11423F-0000bFC@druid.net
Whole thread Raw
In response to Re: [SQL] calculating percentages  (Thomas Good <tomg@nrnet.org>)
List pgsql-sql
Thus spake Thomas Good
> > > How does one do this:   SELECT (current_value/target) * 100;
> The divison rtns 0, which multiplied by 100, rtns 0.

Does "SELECT (current_value * 100)/target" work better?

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 424 2871     (DoD#0082)    (eNTP)   |  what's for dinner.



pgsql-sql by date:

Previous
From: Frederic.De.Leersnijder@pandora.be
Date:
Subject: database design SQL prob.
Next
From: "Ramón Yago"
Date:
Subject: Problem with large binary objects and Delphi