Upper and Lower case sensitivities

Started by Campbell, Scottover 25 years ago3 messagesgeneral
Jump to latest
#1Campbell, Scott
scampbell1@mtt.ca

Hey,

Is there a function within postgres that lets you search for both upper and
lower case at the same time?
I know of the upper() and lower() functions but if a word has both upper and
lower case in it it won't be returned by a query.
Or am I limited to forcing my data to have one case only?

Thanks
Scott

#2Steve Heaven
steve@thornet.co.uk
In reply to: Campbell, Scott (#1)
Re: Upper and Lower case sensitivities

At 09:20 30/08/00 -0300, Campbell, Scott wrote:

Hey,

Is there a function within postgres that lets you search for both upper and
lower case at the same time?
I know of the upper() and lower() functions but if a word has both upper and
lower case in it it won't be returned by a query.
Or am I limited to forcing my data to have one case only?

select * from foo while column_name ~* 'matchstring';

#3Poul L. Christiansen
poulc@miba.auc.dk
In reply to: Campbell, Scott (#1)
Re: Upper and Lower case sensitivities

Try using ~*

Her are the General Operators:
http://www.postgresql.org/docs/user/x2125.htm

"Campbell, Scott" wrote:

Show quoted text

Hey,

Is there a function within postgres that lets you search for both upper and
lower case at the same time?
I know of the upper() and lower() functions but if a word has both upper and
lower case in it it won't be returned by a query.
Or am I limited to forcing my data to have one case only?

Thanks
Scott