Re: SQL Count Magic Required.... First Iteration...

From: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>
To: <operationsengineer1(at)yahoo(dot)com>, "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: SQL Count Magic Required.... First Iteration...
Date: 2006-06-01 18:28:29
Message-ID: C0A4AA0D.C51C%sdavis2@mail.nih.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


> in my test case, i have 5 passes and 9 total and 5/9
> is displayed as
>
> 0.55555555555555...
>
> should i format this in my application code, or does
> pgsql allow for formatting? i want to display 55.5%.

I would do this on the client side, but it doesn't make any particular
difference. Allows you to maintain a separation of your model from your
view.

http://www.postgresql.org/docs/8.1/static/functions-math.html

See the trunc function.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message operationsengineer1 2006-06-01 18:37:22 Re: SQL Count Magic Required.... Second Iteration...
Previous Message Andreas Kretschmer 2006-06-01 18:11:41 Re: Server side communication