Reg: Sql Join - Mailing list pgsql-sql

From CrashBandi
Subject Reg: Sql Join
Date
Msg-id CAAvgTTT02zxdRzfcFiq+V-zDQzcOUNrsQGSLNsi2Xc02kuygKg@mail.gmail.com
Whole thread Raw
Responses Re: Reg: Sql Join  (David G Johnston <david.g.johnston@gmail.com>)
Re: Reg: Sql Join  (Oliver d'Azevedo Christina <oliveiros.cristina@gmail.com>)
Re: Reg: Sql Join  (Gavin Flower <GavinFlower@archidevsys.co.nz>)
List pgsql-sql
Hi,

I am having the following question. I am not sure how to approach it. Please help!

table A
namecol1col2col3col4
apple100111111APL
orange200222223ORG
carrot300333333CRT


table B
custom_namevalueobj_typeobj_id
appleaFR100
orangeoFR200
carrotcVG300
appledFR11111
orangeeVG22222
carrotfUC33333
applehVG1
orangeoFR3
carrotcVG3

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
 

pgsql-sql by date:

Previous
From: Andreas Joseph Krogh
Date:
Subject: Re: Update columns in the same table in a deferred constraint trigger
Next
From: David G Johnston
Date:
Subject: Re: Reg: Sql Join