From: | Steve Crawford <scrawford(at)pinpointresearch(dot)com> |
---|---|
To: | "Don V(dot) Soledad" <don(dot)soledad(at)uratex(dot)com(dot)ph>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: translate function |
Date: | 2003-05-02 15:19:21 |
Message-ID: | 20030502151921.402DD103C7@polaris.pinpointresearch.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
In 7.3.x:
select replace('Juan dela Cruz C/O ABC Co.'::text,'C/O'::text,'c/o'::text);
replace
----------------------------
Juan dela Cruz c/o ABC Co.
(1 row)
Cheers,
Steve
On Thursday 01 May 2003 8:46 pm, Don V. Soledad wrote:
> good day!
>
> how could i use the function translate to output the replacement of the
> exact occurrence of the 2nd parameter?
>
> for instance,
> select translate('Juan dela Cruz C/O ABC Co.','C/O','c/o');
> gives
> translate
> ----------------------------
> Juan dela cruz c/o ABc co.
>
> i would like the output to be "Juan dela Cruz c/o ABC Co." instead of "Juan
> dela cruz c/o ABc co." could i do this with the above function, or are
> there any functions that could do this?
>
> thank you very much!
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
From | Date | Subject | |
---|---|---|---|
Next Message | Bruno Wolff III | 2003-05-02 15:53:18 | Re: TIMEZONE Problem |
Previous Message | Martijn van Oosterhout | 2003-05-02 14:13:29 | Re: Slow Queries with OR's? |