Re: Enforcing Case

Поиск
Список
Период
Сортировка
От paul butler
Тема Re: Enforcing Case
Дата
Msg-id T5cdf41c192ac1785c31d7@pcow058m.blueyonder.co.uk
обсуждение исходный текст
Ответ на Enforcing Case  (JDK <adahma@starport.org>)
Ответы Re: Enforcing Case  (Rod Kreisler <rod@23net.net>)
Re: Enforcing Case  (JDK <adahma@starport.org>)
Список pgsql-novice
>  have a small single table database that multiple people enter data
> into, and I do some reporting from.  I would like to be able to force
> everything to upper case because currently it seems that ABCD or abcd
> or AbCd are all treated as unique, and it cause me problems in
> reporting, not to mention it makes me nuts seeing the data in the
> tables all inconsistent like that.
>
> How would I force everything to upper case?

Would using the upper function work?

for your data entry query

insert into table (field) values (upper(value));

It'll be ok for new entries, but you'll have to do some wrangling on
the old ones if they are to remain unique.

Or on the output side

select upper(field)  from table

Hope this helps

Paul Butler




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

Предыдущее
От: "Chad Thompson"
Дата:
Сообщение: Re: Simple but slow
Следующее
От: Rod Kreisler
Дата:
Сообщение: Re: Enforcing Case