Re: Testing for no input with CONSTRUCT statement
Posted in 1994
Joey Duhon — — source: Informix-list mailing list archive (1991-1998)
> I had a situation where I wanted to prevent the users of a query screen from > simply hitting the escape key and selecting every row in a table. My > problem was that we are using the CONSTRUCT statement to generate the WHERE > clause of the SELECT statement. After many gyrations, I finally discovered > that in such a situation, the CONSTRUCT statement builds its where clause > simply as "1=1", which of course, simply evaluates to TRUE. Unfortunately, > it buries this in a string surrounded by newlines and spaces. I built the with v4.0 and 4.1 the string is " 1=1". it seems unlikely that this will change. use a character comparison on the whole string. matches can fail: "*1=1*" matches "rate1=15.3"