Re: translate function

Поиск
Список
Период
Сортировка
От Steve Crawford
Тема Re: translate function
Дата
Msg-id 20030502151921.402DD103C7@polaris.pinpointresearch.com
обсуждение исходный текст
Ответ на translate function  ("Don V. Soledad" <don.soledad@uratex.com.ph>)
Список 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


В списке pgsql-general по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Slow Queries with OR's?
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: TIMEZONE Problem