i use to build queries in in logic too , into a variable this code work for me:
<xsp:logic> int lookup = 0; String slookup = ""; String lookupstr = ""; String colfilter = ""; slookup = request.getParameter("lookup"); lookupstr = request.getParameter("lookupstr"); if (slookup != null){ lookup = Integer.parseInt(slookup); } if (lookup == 1) { colfilter ="WHERE instr(fname,'".concat(lookupstr).concat("')"); } </xsp:logic> ... ... ... <esql:query>select contact_id, fname, mname, lname from contacts <xsp:expr>colfilter</xsp:expr> </esql:query> hope can help stavros On Sun, 5 Jan 2003, Lajos Moczar wrote: > Yves - > > Why not build your select statement as a string variable inside an > <xsp:logic> block after the root user tag, and then reference it thusly: > > <esql:query> > <xsp:expr>myQuery</xsp:expr> > </esql:query> > > I do this all the time and it works perfectly. > > Regards, > > Lajos > > --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>