Re: [SQL] calculating percentages

From: "D'Arcy" "J(dot)M(dot)" Cain <darcy(at)druid(dot)net>
To: tomg(at)nrnet(dot)org (Thomas Good)
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, tomg(at)admin(dot)nrnet(dot)org, pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] calculating percentages
Date: 1999-07-13 12:52:49
Message-ID: m11423F-0000bFC@druid.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at){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.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Thomas Good 1999-07-13 13:30:39 Re: [SQL] calculating percentages
Previous Message JT Kirkpatrick 1999-07-13 12:39:50