SQL Select Statement for Upper Lower Case Count

Doug Easterbrook doug at artsman.com
Tue Nov 19 22:53:15 UTC 2024


hi martin.

you can do one of

first_name ilike ‘[pFirstName]’

lower(first_name) = lower(‘[pFirstName]’)


iLike (in postgres) is case insensitive search.

lower() is a function





Doug Easterbrook
Arts Management Systems Ltd.
mailto:doug at artsman.com
http://www.artsman.com
Phone (403) 650-1978

> On Nov 19, 2024, at 2:29 PM, Martin Obongita via omnisdev-en <omnisdev-en at lists.omnis-dev.com> wrote:
> 
> Hello everyone,
> I have this statement in postgresql that fetched all records that match the supplied value and returns a count: /* 
> Select (count(1)) from person
> 
> Where first_name=@[pFirstName]
> 
> */
> The challenge is that if the first_name has both upper and lower case entries, then it does not return any value if I supply it with a lowercase value.
> Is there a sql select statement that could run and would ignore the case of the of the column and return a value for both uppercase and lowercase columns?
> Martin.
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com



More information about the omnisdev-en mailing list