Re: Testing for no input with CONSTRUCT sta
Posted in 1994
Topics: General Discussion
> From: uunet!informix.com!johnl (Jonathan Leffler) > >From: Dave Snyder <dave@das13.snide.com> > >In article <1994Jan28.201140.15960@fripp.ri.cadre.com> you write: > >} 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. ... > >} the CONSTRUCT statement builds its where clause simply as "1=1" ... > > >Why can't you replace the two lines (the <<<<< ones) with: > > IF where_part MATCHES "*1=1*" THEN > > Or, even more simply: > > IF where_part = " 1=1" THEN The problem was that when I sent where_part to a file, it looked *odd*. There were 3 or 4 newlines at the beginning, and the "1=1" was embedded in the middle of a lot of spaces. I suppose I can just test for where_part MATCHES "* 1=1 *", now that I think about it in these terms, but I really wanted to make sure that the "1=1" was the only thing in the where_part string. In short, I suppose my function is more work than necessary. Oh, well, back to the keyboard :-) --- =============================================================================== Joe Hartley | jh@cadre.com - Whenever you find that you are on the Cadre Technologies | side of the majority, it is time to reform. - M. Twain 222 Richmond St. | -------------------------------------------------------- Providence, RI 02903 | Overman 1st Class - the Kilgore Trout Memorial Clench (401) 351-5950 x266 | of the Church of the SubGenius ===============================================================================