Subject | Re: Case sensitivity in WHERE clause (newbie question) |
---|---|
Author | Aage Johansen |
Post date | 2002-11-29T20:50:48Z |
darryl_caillouet wrote:
No index will be used for LastName, and you may have to specify a collation
(for LastName).
Another (maybe better/simpler) way is to investigate case insensitive
collations (see http://www.brookstonesystems.com/).
Regards,
Aage J.
> I just started using Firebird yesterday. I'm familiar with SQL ServerIs this always the case (i.e. you cannot do case sensitive search)?
> and MySQL where filtering data using a WHERE clause is not case
> sensitive.
> In SQL Server, if I run:
> SELECT LastName FROM Employee WHERE LastName = 'Caillouet';
> It would return 'CAILLOUET', 'caillouet', 'Caillouet', 'CaIlLoUeT', etc.
> Firebird is only returning the case-sensitive match of 'Caillouet'.select * from EMPLOYEE where Upper(LastName) = 'CAILLOUET'
> In some case-sensitive databases, you can cast the search fields to
> upper or lower case to make the search case-insensitve:
> SELECT * FROM Employee WHERE UCASE(LastName) = UCASE('Caillouet');
No index will be used for LastName, and you may have to specify a collation
(for LastName).
Another (maybe better/simpler) way is to investigate case insensitive
collations (see http://www.brookstonesystems.com/).
Regards,
Aage J.