X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 0A9EAD1D2C1 for ; Sat, 23 Aug 2003 08:43:26 -0300 (ADT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 83052-01 for ; Sat, 23 Aug 2003 08:43:18 -0300 (ADT) Received: from rtlocal.trade-india.com (unknown [61.16.154.82]) by svr1.postgresql.org (Postfix) with SMTP id 95BE0D1D25A for ; Sat, 23 Aug 2003 08:43:09 -0300 (ADT) Received: (qmail 15372 invoked from network); 23 Aug 2003 09:42:12 -0000 Received: from unknown (HELO trade-india.com) (unknown) by unknown with SMTP; 23 Aug 2003 09:42:12 -0000 From: Rajesh Kumar Mallah Organization: Infocom Network Limited To: Tomasz Myrta Subject: Re: Joined deletes but one table being a subquery. Date: Sat, 23 Aug 2003 15:00:37 +0530 User-Agent: KMail/1.5.1 Cc: pgsql-sql@postgresql.org References: <200308221531.13782.mallah@trade-india.com> <3F45EF2E.7060709@klaster.net> In-Reply-To: <3F45EF2E.7060709@klaster.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200308231500.37736.mallah@trade-india.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/285 X-Sequence-Number: 14901 I apologize for the silence. t_a as been created as CREATE TABLE t_a as SELECT userid,category_id from eyp_listing where userid=21742 and size ilike '%WEBFL%' EXCEPT SELECT userid,category_id from company_export_profile where userid=21742 ; so the subquery is basically ( SELECT userid,category_id from eyp_listing where userid=21742 and size ilike '%WEBFL%' EXCEPT SELECT userid,category_id from company_export_profile where userid=21742 ) regds mallah. On Friday 22 Aug 2003 3:53 pm, Tomasz Myrta wrote: > > Hi Folks, > > > > DELETE from eyp_listing where userid=t_a.userid and > > category_id=t_a.category_id; such queries work perfectly. > > > > but if t_a is a subquery how to accomplish the delete. > > What kind of subquery it is? Exist/Not exist doesn't work? > > Regards, > Tomasz Myrta > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faqs/FAQ.html