Re: Casting

From: "PG Explorer" <pgmail(at)pgexplorer(dot)com>
To: "Graham Vickrage" <graham(at)digitalplanit(dot)com>, "Postgres SQL" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Casting
Date: 2002-03-13 20:25:03
Message-ID: 002301c1cacd$2980d520$c80ba8c0@sabex.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Try
to_char(numeric, text)
to_char('125', '9999999999D')

http://www.pgexplorer.com
Postgres GUI

----- Original Message -----
From: "Graham Vickrage" <graham(at)digitalplanit(dot)com>
To: "Postgres SQL" <pgsql-sql(at)postgresql(dot)org>
Sent: Wednesday, March 13, 2002 7:41 PM
Subject: [SQL] Casting

> Hi All,
>
> Probably a very simple question, but... I am trying to cast a large number
> approx
> 20 chars into text so I can manipulate it. I have tried
>
> SELECT text(big_number) from table;
>
> but this comes back in the format 3.2304234234233e+15 for example, whis is
> no good. I essentially need the last four digits of the number (securing
> credit card numbers is the idea), which I can only do by manipulating text
> and casting it back.
>
> Does anyone have any suggestions?
>
> Many thanks,
>
> Graham.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

In response to

  • Casting at 2002-03-13 17:41:24 from Graham Vickrage

Browse pgsql-sql by date

  From Date Subject
Next Message Brian Knox 2002-03-13 21:28:00 Strange Postgresql Indexing Behavior
Previous Message Stephan Szabo 2002-03-13 19:50:12 Re: Referential integrity implementation - bug or user error?