Re: RDS Bug in Construct with Range Symbol
Posted in 1995
>From: Apostolos Varnas <tvarnas@athena.compulink.forthnet.gr> >Date: 10 Mar 1995 08:17:00 GMT >X-Informix-List-Id: <news.12113> > >I have recently found following problem in usage of the CONSTRUCT >statement in 4GL Programs: >Contrary to the manual the .. Symbol is translated as a range Symbol >in all Data Types and not only in DATETIME and INTERVAL Data Types. >Thus if a char field contains something like "aaa......1" it will >be translated as BETWEEN "aaa" AND "....1". >The Versions I use are: >INFORMIX RDS 4.11.UC1 >INFORMIX Online 5.01.UD2 >on SCO Unix >Is this a known INFORMIX Bug ? This is not peculiar to RDS but applies to compiled 4GL as well. What the manual says (page S-93 of the I4GL Supplement for 4.10) is: .. Substitute two periods (..) for the colon in DATETIME and INTERVAL ranges to avoid ambiguity with the field separator in hh:mm:ss values. This does not make it clear that .. will work for any field type, but it does make it clear that you can't use : for ranges with DATETIME and INTERVAL types. I believe the intention is that .. should be used anywhere where a range is required. You should be able to suppress the special meaning with \\.\\. in the query string. Using version 6.01.UD1 of I4GL-RDS, I created the program below and entered the string "aa\\.\\.bb" and got back the query string table01.column02='aa\\.\\.bb' This is arguably not what was wanted, and that might be a bug. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> -- kk.4gl -- MAIN DEFINE s CHAR(60) OPEN FORM f FROM "kk" DISPLAY FORM f CONSTRUCT s ON table01.column02 FROM formonly.* CLOSE FORM f CLEAR SCREEN DISPLAY s END MAIN -- kk.per -- DATABASE FORMONLY SCREEN { [f000 ] } END ATTRIBUTES f000 = FORMONLY.somefield TYPE CHAR; END