agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Torge Kummerow <tk@panaccess.com>
To: ml@ft-c.de
To: pgsql-sql@lists.postgresql.org
Subject: Re: format integer
Date: Sun, 24 Jan 2021 17:48:11 +0100
Message-ID: <FA8645D1-50B6-4A96-8D94-BBDF4A6BAAD1@panaccess.com> (raw)
In-Reply-To: <f3f20234950352a5342a3f6d7fc96eca1f8ebba6.camel@ft-c.de>
References: <f3f20234950352a5342a3f6d7fc96eca1f8ebba6.camel@ft-c.de>
Well strange requirement.
Guess you could do it with
case when x < 10 then ... else when x < 100 then ....
Don't think you'll find anything native.
Am 24. Januar 2021 15:57:02 MEZ schrieb ml@ft-c.de:
>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
--
Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.
view thread (5+ messages) latest in thread
Message-ID: <FA8645D1-50B6-4A96-8D94-BBDF4A6BAAD1@panaccess.com>
Permalink: ../FA8645D1-50B6-4A96-8D94-BBDF4A6BAAD1@panaccess.com/
Also on: postgresql.org/message-id/FA8645D1-50B6-4A96-8D94-BBDF4A6BAAD1@panaccess.com
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: tk@panaccess.com, ml@ft-c.de, pgsql-sql@lists.postgresql.org
Subject: Re: format integer
In-Reply-To: <FA8645D1-50B6-4A96-8D94-BBDF4A6BAAD1@panaccess.com>
* 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