Re: how to ignore case

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

 



On Thu, 2005-05-19 at 13:52, lorid wrote:
> How can I do a simple select statement ignoring the case ? kinda like \i 
> in reg expressions ?
> 
> thanks in advance

You can use upper/lower:

select * from table where lower(somefield) like '%abc%';

or REGEX:

select * from table where lower ~* '.*abc.*';

SEe:

http://www.postgresql.org/docs/8.0/static/functions-matching.html#FUNCTIONS-POSIX-TABLE


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux