Re: Many-to-many problem - Mailing list pgsql-general

From Raymond O'Donnell
Subject Re: Many-to-many problem
Date
Msg-id 4BA3931A.8020407@iol.ie
Whole thread Raw
In response to Re: Many-to-many problem  (Grant Allen <gxallen@gmail.com>)
List pgsql-general
On 18/03/2010 23:18, Grant Allen wrote:
> Hi Raymond,
>
>> From a strictly relational viewpoint, this is as easy as
>
> (select users.uid, apps.appcode from apps, users)
> except
> (select canaccess.uid, canaccess.appcode from canaccess)

Joe & Grant, thanks for your replies... I knew it had to be easy....
that'll teach me to finish working earlier while the brain is clear!

The cartesian product is no problem in my case, as the size of both
tables will never get any bigger than a few dozen rows each.

> It might suit you ... otherwise you'll need to go for the correlated
> subquery approach using not exists.

Can I ask for an example of this?

Thanks,

Ray.


--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

pgsql-general by date:

Previous
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: Order of Daily VACUUM, CLUSTER, REINDEX
Next
From: "Little, Douglas"
Date:
Subject: MS Access 2007 update write conflict problem & resolution