Re: Substitute a Character

From: Chris Mair <chrisnospam(at)1006(dot)org>
To: Judith <jaltamirano(at)correolux(dot)com(dot)mx>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Substitute a Character
Date: 2006-09-06 17:14:37
Message-ID: 1157562877.25934.1.camel@ultra.home.lan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


> Hello everybody!!
>
> I have a field type text with folios like this: A98526
>
> but I want to change de A for a 0 like this: 098526, exists a way to
> do this in a query???
>
> Thanks in advanced!!!

You should look at these functions:
http://www.postgresql.org/docs/8.1/static/functions-string.html

This for example might work for you:
select translate('A98526', 'A', '0');

Bye, Chris.

--

Chris Mair
http://www.1006.org

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Daryl Richter 2006-09-06 20:20:37 Re: Substitute a Character
Previous Message Andreas Kretschmer 2006-09-06 17:09:12 Re: Substitute a Character