You doofus!! If you pass an argument named tblProjData.MktSectorID then all is well. -mjm -----Original Message----- From: Montagne, Michael [mailto:montagne@BOORA.com] Sent: Friday, September 28, 2001 4:15 PM To: 'zope@zope.org' Subject: [Zope] dtml-sqltest The following string in a ZSQL method will not include any where clause. What is wrong? The MktSectorID field occurs in both tables so I need to specify it with the dot notation. Could that be it? If I remove the optional, I get the same result. SELECT tblProjData.projnumb, tblProjData.projname, tblProjPhase.ProjIsActive, tblProjMktSector.projtype, tblProjData.MktSectorID FROM (tblProjData INNER JOIN tblProjMktSector ON tblProjData.MktSectorId = tblProjMktSector.MktSectorID) INNER JOIN tblProjPhase ON tblProjData.ProjPhaseID = tblProjPhase.StatusID <dtml-sqlgroup where> <dtml-sqltest tblProjData.MktSectorID type="int" op="eq" optional> </dtml-sqlgroup> ORDER BY tblProjData.projnumb; _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )