agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Oliver d'Azevedo Christina <oliveiros.cristina@gmail.com>
To: CrashBandi <crashbandicootu@gmail.com>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: Reg: Sql Join
Date: Thu, 31 Jul 2014 00:09:43 +0100
Message-ID: <1D742D88-394D-4B9D-ADF8-D0C832A5B16D@gmail.com> (raw)
In-Reply-To: <CAAvgTTT02zxdRzfcFiq+V-zDQzcOUNrsQGSLNsi2Xc02kuygKg@mail.gmail.com>
References: <CAAvgTTT02zxdRzfcFiq+V-zDQzcOUNrsQGSLNsi2Xc02kuygKg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>

I am not sure if I understand what you're trying to achieve. 
It would help if you could provide an output example. 

Best,
Oliver 

Sent via iPhone, apologies for any errors

Em 30/07/2014, às 11:08 PM, CrashBandi <crashbandicootu@gmail.com> escreveu:

> Hi,
> 
> I am having the following question. I am not sure how to approach it. Please help!
> 
> table A
> name	col1	col2	col3	col4
> apple	100	11111	1	APL
> orange	200	22222	3	ORG
> carrot	300	33333	3	CRT
> 
> 
> table B
> custom_name	value	obj_type	obj_id
> apple	a	FR	100
> orange	o	FR	200
> carrot	c	VG	300
> apple	d	FR	11111
> orange	e	VG	22222
> carrot	f	UC	33333
> apple	h	VG	1
> orange	o	FR	3
> carrot	c	VG	3
> 
> when obj_type ='FR' then join on col1
> When obj_type='VG' then join on col2
> When obj_type='UC' then join on col2
> 
> Thanks In advance,
> CB
>  

view thread (7+ messages)  latest in thread

Message-ID: <1D742D88-394D-4B9D-ADF8-D0C832A5B16D@gmail.com>
Permalink:  ../1D742D88-394D-4B9D-ADF8-D0C832A5B16D@gmail.com/
Also on:    postgresql.org/message-id/1D742D88-394D-4B9D-ADF8-D0C832A5B16D@gmail.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: oliveiros.cristina@gmail.com, crashbandicootu@gmail.com
  Subject: Re: Reg: Sql Join
  In-Reply-To: <1D742D88-394D-4B9D-ADF8-D0C832A5B16D@gmail.com>

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

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