Re: [SQL] calculating percentages

Поиск
Список
Период
Сортировка
От D'Arcy" "J.M." Cain
Тема Re: [SQL] calculating percentages
Дата
Msg-id m11423F-0000bFC@druid.net
обсуждение исходный текст
Ответ на Re: [SQL] calculating percentages  (Thomas Good <tomg@nrnet.org>)
Список 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 по дате отправления:

Предыдущее
От: Frederic.De.Leersnijder@pandora.be
Дата:
Сообщение: database design SQL prob.
Следующее
От: "Ramón Yago"
Дата:
Сообщение: Problem with large binary objects and Delphi