[Zope-DB] subqueries from ZSQL method?
Ole J. Tennvassås
olejt at tiscali.no
Mon Sep 6 16:23:57 EDT 2004
I'm trying to run this SQL statement:
"SELECT s1 FROM t1 WHERE s1 NOT IN (SELECT s1 FROM t2 WHERE s2 =
<dtml-sqlvar s2 type="int">)",
but zope gives the error message:
Error, _mysql_exceptions.ProgrammingError: (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")
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.
If i run the subquery only it works fine.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Zope-DB