I have a query where I join a table to another table that stores email addresses. So a query may go:
SELECT RT.name, RT.address, ET.email
Reference_Table as RT
LEFT OUTER JOIN Email_Table as ET
ON RT.field = ET.field
However more than one email address can be stored per individual, which can give me this output:
Name Address Email
John Smith 1, The Street firstname.lastname@example.org
John Smith 1, The Street email@example.com
My desired output would be:
Name Address Email 1 Email 2
John Smith 1, The Street firstname.lastname@example.org email@example.com
eg having everything on one row, not two rows.
Please can you advise the simplest way of achieving this (if it is simple)? Thank you.