Re: Upper and Lower Case with Informix SE 5
Posted in 2006
Topics: Stored Procedures & SPL, Data Types & Schema Design
Chilli Fiend wrote: There's no external stored procedures or UDTs in 5.0x (or any version of SE). In SPL you'll have to use substrings and brute force to upcase the data for comparison. Like: IF length(string) >= 1 THEN string[1,1] = upshift(string[1,1]) ENDIF IF length(string) >= 2 THEN string[2,1] = upshift(string[2,1]) ENDIF ...... Art S. Kagel > Afternoon Informixers... > > SCO 5 > Informix SE 5 > ISQL 4.20 > > (yes, I know, as old as the hills) > > I've recently taken over responsibility (lucky me) of an Informix SE 5 > database with loads of data. > > We want to do case in-sensitive searches on a few fields to see if we > have duplicates (name, address etc...), however, in my investigations > the following restrictions apply to the current version of the engine: > > 1. SPL in version 5 DOES NOT support VARCHAR variables > 2. SPL in version 5 DOES NOT support the TRIM() function > 3. SPL in version 5 DOES NOT suppor the CLIP function > 4. Concatenating two strings DOES NOT remove trailing spaces > 5. SPL in version 5 DOES NOT support variable off-sets when addressing > character positions using the [] notation i.e. > > LET CharToShift = StrVariable[$start,$finish] > > is NOT supported. > > Unfortunately, upgrading is NOT an alternative!! > > How does one go about doing upper and lower conversions and comparisons > in this god forsaken engine?? > > I have already gone through the IIUG group and trawled my way through > this newsgroup but nothing seems to be the right fit. > > You'd have thought that converting each character in the string to > upper or lower case, one character at a time, would have been the > answer, but due to the restrictions above, this just doesn't work! > > Anyone got any alternative ideas? > > P.S. I don't do C but I know a man who can, if external SPL is the ONLY > alternative... > > Many thanks for reading this, and more thanks for any replies. > > Sean. >
I wish someone would test my procedure in Informix 5 and tell me if it works. It seems simple and reasonably effiecient. Of course I just may not work in version 5 and I really have no way of telling since I only have 9.21 and 10 and have never worked on Informix 5.