agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: ml@ft-c.de
To: pgsql-sql@lists.postgresql.org
Subject: format integer
Date: Sun, 24 Jan 2021 15:57:02 +0100
Message-ID: <f3f20234950352a5342a3f6d7fc96eca1f8ebba6.camel@ft-c.de> (raw)
Hello,
I need a integer format with different decimal places
The integer should have 6 diggits. (or 7 or 8)
Example (6-diggits)
input -> output
123456.789 -> 123456
1234.56789 -> 1234.56
12.3456789 -> 12.3456
but when it is more then 10^6 then
12345678.9 -> 12345678
Is there a pg function for this task?
Franz
view thread (5+ messages) latest in thread
Message-ID: <f3f20234950352a5342a3f6d7fc96eca1f8ebba6.camel@ft-c.de>
Permalink: ../f3f20234950352a5342a3f6d7fc96eca1f8ebba6.camel@ft-c.de/
Also on: postgresql.org/message-id/f3f20234950352a5342a3f6d7fc96eca1f8ebba6.camel@ft-c.de
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: ml@ft-c.de, pgsql-sql@lists.postgresql.org
Subject: Re: format integer
In-Reply-To: <f3f20234950352a5342a3f6d7fc96eca1f8ebba6.camel@ft-c.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox