Re: Three cheers for 4gl's CONSTRUCT
Posted in 1995
In article <3i2vjd$66u@newsbf02.news.aol.com> miket300@aol.com (MikeT300) writes: >>The CONSTRUCT statement in 4gl is the best thing ever. > >We like the CONSTRUCT statement too. I just wish there was a >way to specify that the query be case insensitive for >char variables. Right now, we just upshift all char fields because >the construct statement builds a where clause that is case sensitive. > >How about: >OPTIONS CONSTRUCT CASE INSENSITIVE The *real* problem is that the underlying engines do not provide a case- insensitive search directive, a la Oracle's upper() and lower() functions. We *could* set up 4GL such that it produced a very ugly MATCHES or LIKE clause, e.g. ... where charvar matches "[tT][hH][iI][sS] [sS][uU][cC][kK][sS]!" but with the pertinent engine built-in functions coming soon, we'd have an "old way" or "new way" OPTION to deal with, and... ugh. But until then, you *really* don't want to do this much in the engines anyhow if you can avoid it, since it would require sequential searches among the otherwise-qualified rows. A much better solution is to mirror any frequently-case-insensitive-queried columns into upshifted equivalents and make your match value uppercase (or both lowercase, of course). >Mike Teachworth >CodeGen Software, Inc >800-598-8649 >504-456-1260 fax >work email: mike@codegen.com -- Alan Denney aland@informix.com "I believe there are more instances of the abridgment of the freedom of the people by gradual and silent encroachment of those in power than by violent and sudden usurpations." -- James Madison