Casting

From: "Graham Vickrage" <graham(at)digitalplanit(dot)com>
To: "Postgres SQL" <pgsql-sql(at)postgresql(dot)org>
Subject: Casting
Date: 2002-03-13 17:41:24
Message-ID: NDBBJABDILOPAOOMFJHOOEOADEAA.graham@digitalplanit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2002-03-13 18:18:02 Re: Help reqd: Copying char to date
Previous Message Josh Berkus 2002-03-13 17:38:25 Re: [INIMSS] How to use OID?