Re: Joined deletes but one table being a subquery.

From: Rajesh Kumar Mallah <mallah(at)trade-india(dot)com>
To: Tomasz Myrta <jasiek(at)klaster(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Joined deletes but one table being a subquery.
Date: 2003-08-23 09:30:37
Message-ID: 200308231500.37736.mallah@trade-india.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jeff Eckermann 2003-08-23 16:55:44 Re: Delete denied?
Previous Message Jamie Lawrence 2003-08-23 05:16:53 Re: Auto-update a field when record is changed