Received: from btclick.com (mta01.btfusion.com [62.172.195.11]) by postgresql.org (Postfix) with ESMTP id 3681D476998 for ; Wed, 13 Mar 2002 12:40:51 -0500 (EST) Received: from [213.120.147.156] ([213.120.147.156]) by btclick.com (Netscape Messaging Server 4.15) with SMTP id GSXAG703.OGO for ; Wed, 13 Mar 2002 17:40:55 +0000 From: "Graham Vickrage" To: "Postgres SQL" Subject: Casting Date: Wed, 13 Mar 2002 17:41:24 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-Archive-Number: 200203/159 X-Sequence-Number: 7039 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.