Re: join two tables without a key

From: "Igor Neyman" <ineyman(at)perceptron(dot)com>
To: "Dino Vliet" <dino_vliet(at)yahoo(dot)com>, <rod(at)iol(dot)ie>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: join two tables without a key
Date: 2010-04-05 14:11:01
Message-ID: F4C27E77F7A33E4CA98C19A9DC6722A205C70A70@EXCHANGE.corp.perceptron.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dino,

Not trying to be a "database purist" here, but...

If table A has no key, then why X,Y, and Z belong in one table?
And, table B has no key, then why P,Q, and R belong in one table?

And even more so, why are you trying to put X,Y,Z,P,Q,R into one table?
May be, if you tell us, what business entity/rule you are trying to
implement here, it'll be easier to help you.

Igor Neyman

> -----Original Message-----
> From: Dino Vliet [mailto:dino_vliet(at)yahoo(dot)com]
> Sent: Saturday, April 03, 2010 7:32 AM
> To: rod(at)iol(dot)ie
> Cc: pgsql-general(at)postgresql(dot)org
> Subject: Re: join two tables without a key
>
> --- On Sat, 4/3/10, Raymond O'Donnell <rod(at)iol(dot)ie> wrote:
>
>
>
> From: Raymond O'Donnell <rod(at)iol(dot)ie>
> Subject: Re: [GENERAL] join two tables without a key
> To: "Dino Vliet" <dino_vliet(at)yahoo(dot)com>
> Cc: pgsql-general(at)postgresql(dot)org
> Date: Saturday, April 3, 2010, 1:01 PM
>
>
> On 03/04/2010 11:16, Dino Vliet wrote:
>
> > Hi postgresql list, If I have two tables with the
> same number of rows
> > but different columns and I want to create one table
> out of them what
> > would be the way to do that in postgresql?
> >
> > Table A has N number of rows and columns X,Y,Z and
> Table B has N
> > number of rows and P,Q,R as columns. None of the tables have a
> > column which can be used as a key.
> >
> > The resulting table should have N number of rows and
> X,Y,Z,P,Q,R as
> > columns.
>
> How do the rows in the tables relate to each other? You
> need to decide
> first how you match the rows in A and B.
>
> Ray.
>
>
> --
> Raymond O'Donnell :: Galway :: Ireland
> rod(at)iol(dot)ie
>
>
>
> Hi Ray,
>
>
>
>
>
>
>
> they don' t. It' s pure randomly generated data.
>
>
>
>
> Brgds
>
>
>
>
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrus 2010-04-05 14:26:39 Re: How to fix set-valued function called in context that cannot accept a set in earlier versions
Previous Message Merlin Moncure 2010-04-05 13:40:24 Re: How to fix set-valued function called in context that cannot accept a set in earlier versions