Subject | Re: [firebird-support] convert field to lower/upper case in where clause |
---|---|
Author | Helen Borrie |
Post date | 2005-02-10T00:37:02Z |
At 12:51 PM 10/02/2005 +1300, you wrote:
function UPPER().
where UPPER(first_name) = 'JAMES'
or, in real life, using a parameterised search,
where UPPER(first_name) = UPPER(?)
To work with lower case expression, you would need to have an external
lower case conversion function available, e.g. lower() in ib_udf.
where LOWER(first_name) = 'james'
etc.
./hb
>Hi,Turn this around to use an upper case search and you can use the internal
>
>I wish to look for a particular word in the where clause of my query, I
>do not want to do a case sensitive match,
>so I figured if I just converted the two fileds to lower case then I
>could do the match with some degree of accuracy.
>
>trouble is I'm not sure how to convert a field to lower case.
>to get the gist of what I am trying to acheive I have included the where
>clause below -- which does not work.
>
>select * from tblTest
>where LCASE(tblTest.first_name) = 'james'
>
>can anybody please help with this seemingly simple question.
function UPPER().
where UPPER(first_name) = 'JAMES'
or, in real life, using a parameterised search,
where UPPER(first_name) = UPPER(?)
To work with lower case expression, you would need to have an external
lower case conversion function available, e.g. lower() in ib_udf.
where LOWER(first_name) = 'james'
etc.
./hb