Received: from homer.websystems.co.za (unknown [196.25.70.70]) by postgresql.org (Postfix) with ESMTP id 26545475FF0 for ; Wed, 13 Mar 2002 15:25:36 -0500 (EST) Received: from hano (bnb53-01-p218.nt.saix.net [155.239.180.218]) by homer.websystems.co.za (8.11.0/8.11.0) with SMTP id g2DKV9Q29597; Wed, 13 Mar 2002 22:31:09 +0200 Message-ID: <002301c1cacd$2980d520$c80ba8c0@sabex.com> From: "PG Explorer" To: "Graham Vickrage" , "Postgres SQL" References: Subject: Re: Casting Date: Wed, 13 Mar 2002 22:25:03 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200203/171 X-Sequence-Number: 7051 Try to_char(numeric, text) to_char('125', '9999999999D') http://www.pgexplorer.com Postgres GUI ----- Original Message ----- From: "Graham Vickrage" To: "Postgres SQL" 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@postgresql.org