Re: matching rows differing only by fkey,pkey - Mailing list pgsql-sql

From Matthew Nuzum
Subject Re: matching rows differing only by fkey,pkey
Date
Msg-id 200406221740.i5MHe6nb015623@ms-smtp-02.tampabay.rr.com
Whole thread Raw
In response to Re: matching rows differing only by fkey,pkey  (Bruno Wolff III <bruno@wolff.to>)
Responses Re: matching rows differing only by fkey,pkey
List pgsql-sql
Thanks for your suggestion to use curval(), that will be useful.  I'd
entirely forgotten about that function.  That likely will help when combined
with Richard's suggestion and an idea I already had.

I'm sorry that the problem wasn't clearer.  The best way I can describe it
is like this: The end result is to duplicate the data for a particular record in table "a" so that all of it's related
datain tables "b" and "c" is duplicated.
 
Where "b" is the middle table in a many to many relationship.  For example,

- a ----    - b ----    - c ----aid  <--+   bid  <--+   ciddata1   +-->aid     +-->biddata2       field1
info1date3      field2      info2
 

SELECT a.*,b.*,c.* from a,b,c where b.aid = a.aid and c.bid = b.bid;

So, the goal is to duplicate an object that is made up of the data stored
across these three tables. 

Any suggestions?

Matthew Nuzum        | ISPs: Make $200 - $5,000 per referral by
www.followers.net        | recomending Elite CMS to your customers!
matt@followers.net    | http://www.followers.net/isp





pgsql-sql by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: matching rows differing only by fkey,pkey
Next
From: Bruno Wolff III
Date:
Subject: Re: matching rows differing only by fkey,pkey