Re: Uppercase and Lowercase

Поиск
Список
Период
Сортировка
От Bart Degryse
Тема Re: Uppercase and Lowercase
Дата
Msg-id 45D9D4E9.A3DD.0030.0@indicator.be
обсуждение исходный текст
Ответ на Re: Uppercase and Lowercase  ("Shavonne Marietta Wijesinghe" <shavonne.marietta@studioform.it>)
Список pgsql-sql
Of course it does. That's what you ask your query to do. You only used the wrong operator for string concatenation, which is why it didn't seem to work. But your query will not do this for each word in a field. For that you need a function or regular expressions. I suggest you try
select initcap(pa_indirizzo) from ..

Please always reply to pgsql-sql@postgresql.org and not to the senders email address.

>>> "Shavonne Marietta Wijesinghe" <shavonne.marietta@studioform.it> 2007-02-19 16:39 >>>
Hey thanks Bart. it worked ;)
 
but sadly what it does is changes  "VIA SENATO" in to "Via senato" but what i need  is "Via Senato"
 
Anyoneeeeeee??
 
 
 
Shavonne Wijesinghe
----- Original Message -----
Sent: Monday, February 19, 2007 4:25 PM
Subject: Re: [SQL] Uppercase and Lowercase

Replace && by ||

>>> "Shavonne Marietta Wijesinghe" <shavonne.marietta@studioform.it> 2007-02-19 16:22 >>>
Hello
 
In my PostgreSQL database i have records inserted in Uppercase.
For example: VIA SENATO
 
What i want is to change them to "Via Senato". Ofcourse i'm looking for a automatico way. I wrote this code update registro1 set pa_indirizzo = upper(substr(pa_indirizzo, 1, 1)) && lower(substr(pa_indirizzo, 2, length(pa_indirizzo) - 1)) But it doesn't work.
 
When i run only update registro1 set pa_indirizzo = upper(substr(pa_indirizzo, 1, 1)) It gets me the first letter and when i run
update registro1 set pa_indirizzo = lower(substr(pa_indirizzo, 2, length(pa_indirizzo) - 1)) I get from the second letter to the last. But when i join them them don't work..
 
 
Anyone got any idea??
 
Thanks
 
Shavonne Wijesinghe

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

Предыдущее
От: "Shavonne Marietta Wijesinghe"
Дата:
Сообщение: Re: Uppercase and Lowercase
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Uppercase and Lowercase