I'm having problems joining 3 tables to provide a 4th table in the correct
format. I believe I need a FULL OUTER JOIN but does not give the result that
I require.See below:
Example 1
Table: Names Table: Friend
Name Tel email PostCode Name friend email
Jim 1 aa I Dave yes cc
Ted 2 bb J Will yes dd
Dave 3 cc K Zac yes ff
Will 4 dd L Byron yes gg
Table: Details
Name email Town PostCode
John ee A M
Zac ff B N
Byron gg C O
Will dd D L
Gary hh E P
Ted bb F J
Combined table: Result
Name Tel email Town PostCode friend
Jim 1 aa I
Ted 2 bb F J
Dave 3 cc K yes
Will 4 dd D L yes
John ee A M
Zac ff B N yes
Byron gg C O yes
Gary hh E P
Example 2
Table: Names Table: Friend
Name Tel email PostCode Name friend email
Jim 1 aa I Gareth yes ii
Ted 2 bb J Tony yes jj
Dave 3 cc K Ken yes kk
Will 4 dd L Lloyd yes ll
Table: Details
Name email Town PostCode
John ee A M
Zac ff B N
Byron gg C O
Gary hh E P
Combined table: Result
Name Tel email Town PostCode friend
Jim 1 aa I
Ted 2 bb J
Dave 3 cc K
Will 4 dd L
John ee A M
Zac ff B N
Byron gg C O
Gary hh E P
Gareth ii yes
Tony jj yes
Ken kk yes
Lloyd ll yes
--
Sent from: https://www.postgresql-archive.org/PostgreSQL-pgadmin-support-f2191615.html