Re: Substitute a Character - Mailing list pgsql-sql

From Chris Mair
Subject Re: Substitute a Character
Date
Msg-id 1157562877.25934.1.camel@ultra.home.lan
Whole thread Raw
In response to Substitute a Character  (Judith <jaltamirano@correolux.com.mx>)
List 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



pgsql-sql by date:

Previous
From: Andreas Kretschmer
Date:
Subject: Re: Substitute a Character
Next
From: Daryl Richter
Date:
Subject: Re: Substitute a Character