Re: Case-insensitive search - HOW?

From: Mike Kohut, NorthwesTel <mkohutnw_at_yknet.yk.ca>
Date: 1995/06/21
Message-ID: <3s7v4b$9q8_at_spot.YKnet.yk.ca>#1/1


al-her_at_sectra.se (Almut Herzog) wrote:
> I'm an Informix user in need to implement a case-insensitive search. This
> is quite ugly in Informix. How would you do it with Oracle?
>
Use the UPPER function in your Oracle query.

For example: SELECT * FROM EMP_TABLE WHERE UPPER(SURNAME) = 'SMITH'

This will match surnames such as 'SMITH', 'smith', 'Smith', etc.

Note: If your database is large, and you often do case-insensitive queries, then you should have a duplicate single-case field that you can search on. For example, you might have a mixed-case surname of 'McDonald', then have a secondary field containing 'mcdonald'. By searching only on the single-case secondary field, you would speed up your queries considerably. Received on Wed Jun 21 1995 - 00:00:00 CEST

Original text of this message