Re: Selecting all records which are in upper case

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Selecting all records which are in upper case
Дата
Msg-id 20110827101017.GA12352@svana.org
обсуждение исходный текст
Ответ на Selecting all records which are in upper case  (Amitabh Kant <amitabhkant@gmail.com>)
Ответы Re: Selecting all records which are in upper case  (Amitabh Kant <amitabhkant@gmail.com>)
Список pgsql-general
On Sat, Aug 27, 2011 at 03:12:44PM +0530, Amitabh Kant wrote:
> Hello
>
> I have a simple table 'location' :
> id -> Int (associated with a sequence)
> name -> Character varying (100)
>
> I have to delete all records where values in name field are all in upper
> case. For example, if the test data is as follows:

Might not work if you have non-ascii characters (but your example code
breaks there too), but what about:

DELETE ... WHERE upper(name) = name;

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> He who writes carelessly confesses thereby at the very outset that he does
> not attach much importance to his own thoughts.
   -- Arthur Schopenhauer

Вложения

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

Предыдущее
От: Amitabh Kant
Дата:
Сообщение: Selecting all records which are in upper case
Следующее
От: Amitabh Kant
Дата:
Сообщение: Re: Selecting all records which are in upper case