Re: a very primitive question about division

2018-03-07 Thread Martin Mueller
uot; Subject: Re: a very primitive question about division On Wed, Mar 7, 2018 at 10:56 AM, Martin Mueller mailto:martinmuel...@northwestern.edu>> wrote: But there is no example of 4/9 and the different ways of formatting it as a decimal fraction with different options for rounding or a perce

Re: a very primitive question about division

2018-03-07 Thread David G. Johnston
On Wed, Mar 7, 2018 at 10:56 AM, Martin Mueller < martinmuel...@northwestern.edu> wrote: > But there is no example of 4/9 and the different ways of formatting it as > a decimal fraction with different options for rounding or a percentage. > ​That would be the responsibility of the "Data Type Form

Re: a very primitive question about division

2018-03-07 Thread Martin Mueller
progressed much beyond 8th grade math. From: "David G. Johnston" Date: Wednesday, March 7, 2018 at 11:43 AM To: Martin Mueller Cc: "pgsql-general@lists.postgresql.org" Subject: Re: a very primitive question about division On Wed, Mar 7, 2018 at 10:30 AM, Martin Muelle

Re: a very primitive question about division

2018-03-07 Thread David G. Johnston
On Wed, Mar 7, 2018 at 10:30 AM, Martin Mueller < martinmuel...@northwestern.edu> wrote: > Thanks. So round(before1550/colfreq::numeric, 2) produces the desired > result. > > > > The explanations and examples of string functions in the Postgres > documentation are a model of clarity. The explan

Re: a very primitive question about division

2018-03-07 Thread Martin Mueller
. From: "David G. Johnston" Date: Wednesday, March 7, 2018 at 11:23 AM To: Martin Mueller Cc: "pgsql-general@lists.postgresql.org" Subject: Re: a very primitive question about division On Wed, Mar 7, 2018 at 10:21 AM, Martin Mueller mailto:martinmuel...@northwestern.edu>&g

Re: a very primitive question about division

2018-03-07 Thread David G. Johnston
On Wed, Mar 7, 2018 at 10:21 AM, Martin Mueller < martinmuel...@northwestern.edu> wrote: > Given two values defined as integers, how do I divide one by the other and > get an answer with two decimals, e.g 3 /4 = 0.75. > ​Case one of them to numeric. ​select 3/4::numeric ​ ​David J.​