<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Melding</TITLE>
<META content="MSHTML 6.00.2800.1458" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=583121620-06092004>I'm trying to run
this SQL statement:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=583121620-06092004>"SELECT s1
FROM t1 WHERE s1 NOT IN (SELECT s1 FROM t2 WHERE s2 =
<dtml-sqlvar s2 type="int">)",</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=583121620-06092004>but zope gives the
error message:</SPAN></FONT></DIV>
<DIV><FONT><SPAN class=583121620-06092004><STRONG>Error,
<EM>_mysql_exceptions.ProgrammingError</EM>:</STRONG> (1064, "You have an error
in your SQL syntax. Check the manual that corresponds to your MySQL server
version for the right syntax to use near 'SELECT s1 FROM t2
WHERE s2 = 2) LIMIT 1000")</SPAN></FONT></DIV>
<DIV><FONT><SPAN class=583121620-06092004>What i want to do is list all values
of s1 in table 1 which isnt found in table 2 rows where s2 some dynamic
value.</SPAN></FONT></DIV>
<DIV><FONT><SPAN class=583121620-06092004>If i run the subquery only it works
fine.</SPAN></FONT></DIV>
<DIV><FONT><SPAN class=583121620-06092004>Any
suggestions?</SPAN></FONT></DIV></BODY></HTML>