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 HAA41370 for ; Wed, 16 Jun 1999 07:23:55 -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 73A9E4B585; Wed, 16 Jun 1999 14:23:53 +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 AAA6374; Wed, 16 Jun 1999 14:26:35 +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, 16 Jun 1999 14:25:06 +0300 To: Remigiusz Sokolowski , pgsql-sql@postgreSQL.org From: Herouth Maoz Subject: Re: [SQL] converting from number to text At 12:31 +0300 on 16/06/1999, Remigiusz Sokolowski wrote: > I need convert number(float or integer) to text, but my version of > postgres (i.e. 6.3.2) seems to have not such a function? > Is it may be in newer versions or is there any work-around? > TIA > Rems > p.s. concept is to have field, which contain date in timestamp form > (number of seconds from 'epoch'), but in which I could insert also value > 'until cancellation' or any other text. I think a better approach to your problem would be to add a status field. The status field will contain anysuch additional information, and the date field will only contain a date when the given status demands it. How you display it in a report is a different matter - You can write a function that queries the status field and substitutes it with the date value if the status is so-and-so. Herouth -- Herouth Maoz, Internet developer. Open University of Israel - Telem project http://telem.openu.ac.il/~herutma