Re: Three cheers for 4gl's CONSTRUCT
Posted in 1995
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
>>How about: >> >>OPTIONS CONSTRUCT CASE INSENSITIVE >> >Why not the following: > >CONSTRUCT string_var ... >END CONSTRUCT >LET string_var = UPSHIFT(string_var) > >This should do whatever you need because table/column names are already >case-insensitive. Thanks for the solution, but unfortunately your suggestion won't accomplish what I want. Its true that column names are case insensitive, but your solution will only match char values that are upper case. I want to be able to match char strings REGARDLESS of the case of the characters in the strings in the table. Here's an example that might help to explain the problem more clearly: Data in the table: smith SMITH Smith User running CONSTRUCT enters "sm*" With the current CONSTRUCT statement functionality, only "smith" is matched. Your suggested solution would change the where string returned by the CONSTRUCT so that only "SMITH" is matched.. If there were an OPTIONS CASE INSENSITIVE, like I am suggesting, then "smith", "SMITH", and "Smith" would all be matched when the user enters "sm*" as his search criteria. Unfortunately, there is no OPTIONS CASE INSENSITIVE for the CONSTRUCT statement, so the only way to solve the problem is to upshift those char fields in the .pers. That way INPUT char data is upshifted, and the CONSTRUCT where string is upshifted too. The only thing is that imported data must be upshifted before insertion into the table. Regards, Mike Teachworth CodeGen Software, Inc 800-598-8649 504-456-1260 fax work email: mike@codegen.com