Received: from smtp.shellnet.co.uk (smtp.shellnet.co.uk [194.129.209.14]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA35836 for ; Wed, 7 Jul 1999 10:37:20 -0400 (EDT) (envelope-from johnridout@ctasystems.co.uk) Received: from johnridout (station.ttg.co.uk [194.159.177.252] (may be forged)) by smtp.shellnet.co.uk (8.9.3/8.9.1-shellnet.stevenf) with SMTP id PAA25665; Wed, 7 Jul 1999 15:37:10 +0100 (BST) Posted-Date: Wed, 7 Jul 1999 15:37:10 +0100 (BST) From: "John Ridout" To: "'Alessandro Rossi'" , Subject: RE: [SQL] RETURN VALUES ON INTEGERS Date: Wed, 7 Jul 1999 15:36:15 +0100 Message-ID: <000001bec886$161377a0$0301010a@johnridout> 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 8.5, Build 4.71.2173.0 In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 > I have the following DATABASE. > > CREATE TABLE codestatus ( > id int primary key, > code int, > status char > ); > > code is an int number made at least of 6 numbers. > (range from 0 up to 999999) > > If i do : > > select * from codestatus; > > I GET: > > id|code|status > --+------+------ > 1| 44111|N > 2| 123|S > > BUT I WOULD LIKE TO GET > > id|code|status > --+------+------ > 1|044111|N > 2|000123|S > > How could I fix the prbolem and get the values as I ned them > out of the > select ? > > thanks in advance > > Alex > Try select id, lpad(code, 6, '0'), status from codestatus John