Re: [SQL] converting from number to text

From: Remigiusz Sokolowski <rems(at)gdansk(dot)sprint(dot)pl>
To: Herouth Maoz <herouth(at)oumail(dot)openu(dot)ac(dot)il>
Cc: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] converting from number to text
Date: 1999-06-16 11:46:45
Message-ID: Pine.GS4.4.02A.9906161343380.13802-100000@netra.gdansk.sprint.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> > 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.

This is very good idea
Thanks :-)
Rem

-------------------------------------------------------------------*------------
Remigiusz Sokolowski e-mail: rems(at)gdansk(dot)sprint(dot)pl * *
-----------------------------------------------------------------*****----------

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message D'Arcy J.M. Cain 1999-06-16 12:00:55 Re: [HACKERS] Postgres mailing lists
Previous Message Anatoly K. Lasareff 1999-06-16 11:34:48 Re: [SQL] converting from number to text