Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!decwrl!nsc!pyramid!infmx!aland From: aland@informix.com (alan denney) Newsgroups: comp.databases Subject: Re: Informix 4GL CONSTRUCT question Summary: still need more info Keywords: clarification Message-ID: <1990Oct11.025445.1745@informix.com> Date: 11 Oct 90 02:54:45 GMT References: <1990Oct4.141922.5268@informix.com> <1990Oct4.235559.22686@informix.com> <59822@bbn.BBN.COM> Sender: news@informix.com (Usenet News) Distribution: na Organization: INFORMIX Professional Services ("Peace thru Normalization") Lines: 26 In article <59822@bbn.BBN.COM> eboneste@BBN.COM (Liz Bonesteel) writes: > >Since I've received several (thanks, folks!) responses to this >question, all suggesting the same course of action, I thought I'd try >to be a little more clear in the statement of my problem. > > CONSTRUCT p1query ON (...fields...) FROM (...fields...) > CONSTRUCT p2query ON (...fields...) FROM (...fields...) > > LET s1 = "SELECT * FROM stattbl WHERE ", p1query CLIPPED, " AND ", > p2query CLIPPED > PREPARE s_1 FROM s1 > >This doesn't work. However, if I define s1 and s2 and prepare the two >queries separately (not helpful for the application, but an >interesting exercise nonetheless), I have no problems. But, what goes into the two strings? After you run the CONSTRUCTs, try displaying the contents of the two p?query strings and/or the final s1 string and see if the contents make sense. (Is s1 big enough to handle an arbitrarily complex query?) -- Alan Denney aland@informix.com {pyramid|uunet}!infmx!aland I'm Pro-Anarchy... and I Vote!