Search Postgresql Archives

Re: Selecting all records which are in upper case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>   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

Attachment: signature.asc
Description: Digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux