Re: Substitute a Character

From: Daryl Richter <daryl(at)eddl(dot)us>
To: Judith <jaltamirano(at)correolux(dot)com(dot)mx>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Substitute a Character
Date: 2006-09-06 20:20:37
Message-ID: C124A5D5.50E8%daryl@eddl.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On 9/6/06 12:53 PM, "Judith" <jaltamirano(at)correolux(dot)com(dot)mx> wrote:

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

select translate( 'A98526', 'A', '0' );

translate
------------
098526

1 record(s) selected [Fetch MetaData: 1/ms] [Fetch Data: 0/ms]

[Executed: 9/6/06 4:18:44 PM EDT ] [Execution: 99/ms]

>
> Thanks in advanced!!!
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend

--
Daryl
Email *my = [ daryl at: @"eddl" dot: @"us" ];
Weblog *blog = @²http://itsallsemantics.com²;

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Daniel CAUNE 2006-09-06 22:32:40 Evaluation of if conditions
Previous Message Chris Mair 2006-09-06 17:14:37 Re: Substitute a Character