Received: from mx99.openu.ac.il (arbel.openu.ac.il [147.233.32.4]) by hub.org (8.9.3/8.9.3) with ESMTP id IAA10133 for ; Wed, 7 Jul 1999 08:52:54 -0400 (EDT) (envelope-from herouth@oumail.openu.ac.il) Received: from talmon.openu.ac.il (talmon.openu.ac.il [147.233.32.11]) by mx99.openu.ac.il (Postfix) with ESMTP for id D5E1E4B5B2; Wed, 7 Jul 1999 15:52:52 +0300 (IDT) Received: from [147.233.159.109] (mac-herouth.pc.openu.ac.il) by talmon.openu.ac.il (Netscape Messaging Server 3.54) with ESMTP id AAA1337; Wed, 7 Jul 1999 15:55:55 +0300 X-Sender: herouth@shaked.cc.openu.ac.il Message-Id: In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Wed, 7 Jul 1999 15:52:51 +0300 To: Alessandro Rossi , pgsql-sql@postgreSQL.org From: Herouth Maoz Subject: Re: [SQL] RETURN VALUES ON INTEGERS At 15:24 +0300 on 07/07/1999, Alessandro Rossi wrote: > 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 ? Try lpad. For example: testing=> select num, lpad( num, 6, '0' ) from test1; num| lpad ------+------ 2|000002 4|000004 38|000038 199|000199 100399|100399 (5 rows) Herouth -- Herouth Maoz, Internet developer. Open University of Israel - Telem project http://telem.openu.ac.il/~herutma