pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rajesh Kumar Mallah <mallah@trade-india.com>
To: Tomasz Myrta <jasiek@klaster.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: Joined deletes but one table being a subquery.
Date: Sat, 23 Aug 2003 15:00:37 +0530
Message-ID: <200308231500.37736.mallah@trade-india.com> (raw)
In-Reply-To: <3F45EF2E.7060709@klaster.net>
References: <200308221531.13782.mallah@trade-india.com>
	<3F45EF2E.7060709@klaster.net>



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




view thread (4+ messages)  latest in thread

Message-ID: <200308231500.37736.mallah@trade-india.com>
Permalink:  ../200308231500.37736.mallah@trade-india.com/
Also on:    postgresql.org/message-id/200308231500.37736.mallah@trade-india.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mallah@trade-india.com, jasiek@klaster.net
  Subject: Re: Joined deletes but one table being a subquery.
  In-Reply-To: <200308231500.37736.mallah@trade-india.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox