[Zope-DB] Re: [Zope] Problems with "Subselect" in SQL statment

Thierry FLORAC tflorac@onf.fr
Mon, 5 Nov 2001 13:59:44 +0100


On 05.11.2001  -  13:17 Florian Schuler wrote:
> Hello List,
> 
> I have a problem using ZSQL Methods. If I do something like this:
> 
> select * from person where id != (Select userid from projektmitglieder
> where projektid='20');
> 
> Zope gives me an error !

You should probably use :

   select * from person where id not in (select userid ... );

and this even if your subrequest is known to always retrieve only one row 
!!

   Thierry