Re: Reg: Sql Join

Поиск
Список
Период
Сортировка
От Oliver d'Azevedo Christina
Тема Re: Reg: Sql Join
Дата
Msg-id 1D742D88-394D-4B9D-ADF8-D0C832A5B16D@gmail.com
обсуждение исходный текст
Ответ на Reg: Sql Join  (CrashBandi <crashbandicootu@gmail.com>)
Список pgsql-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
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 по дате отправления:

Предыдущее
От: David G Johnston
Дата:
Сообщение: Re: Reg: Sql Join
Следующее
От: Gavin Flower
Дата:
Сообщение: Re: Reg: Sql Join