Okay so say I have something like this:
ID | Name | Address
1 | Bob | 123 Fake Street
1 | Bob | 221 Other Street
done by doing something like:
select p.ID, p.Name a.Address from People p
inner join Addresses a on a.OwnerID = p.ID
Is there any way to turn that into
ID | Name | Address_1 | Address_2 | etc...
1 | Bob | 123 Fake Street | 221 Other street | etc
I've seen things that do comma separated values in one column but I don't want that I want distinct columns. I am querying this using MSSQL and C# I don't know if that changes anything. Also this is a made up scenario that is just similar to what I'm doing so the actual structure of the tables can't be changed.
Anyone have any suggestions?