Re: 4gl case sensitive
Posted in 1994
->From: palkoci@feld.cvut.cs (Milos Palkoci FIDO )
->Subject: 4gl case sensitive
->Date: Mon, 21 Mar 1994 19:54:30 MET
->Reply-To: palkoci@feld.cvut.cs (Milos Palkoci FIDO )
->Organization: Faculty of Electrical Engineering CTU Prague
->
->Hi everybody,
->
->I am an begginer in 4GL and have encounterd the problem of
->ignore case searching, after givving criteria by user (using construct
->command).
->I simply want ignore case searching like in FoxPro,...
->
->Is there any possibility, how to set ignore case searching in 4GL.
->
->Thanks, Milos
->
->palkoci@feld.cvut.cz
->DATA.22
Milos,
Informix does not support case insensitivity at the SQL level. Since you
are using 4GL, you can use the 4GL library functions UPSHIFT and/or DOWNSHIFT
to get most of the functionality that you want. If it is important for you
to preserve the original case of data, but also to search ignoring case, then
you may need to store key fields twice. For example:
create table person
( lname char(15) { McNamara, de Neuve, O'Dell, etc. }
, lnameup char(15) { MCNAMARA, DE NEUVE, O'DELL, etc. }
, fname char(15) { Roger, LeRoy, Samantha, etc. }
, fnameup char(15) { ROGER, LEROY, SAMANTHA, etc. }
, other fields as needed )
Your 4GL program would have to take any input data and generate the {x}nameup
fields from the {x}name fields before storing the data. Similarly, your
program would convert any search criteria to upper case, search on the
{x}nameup fields, and then display the {x}name fields.
I have to admit, this is one area where I prefer Oracle. They chose to
include their UPPER and LOWER functions as extensions to the SQL language.
I would encourage Informix to consider this as an enhancement to future
versions of their SQL product.
Regards,
Alan ___________________________
______________________| R. Alan Popiel |__________________________
\\ Internet: | Martin Marietta, SLS | /
\\ alan@den.mmc.com | P.O. Box 179, M/S 3810 | Std disclaimers apply. /
)Voice: | Denver, CO 80201-0179 USA | (
/ 303-977-9998 |___________________________| (But you knew that!) \\
/________________________) (____________________________\\