I've simplified this so that someone can hopefully figure out how to do this. I have 4 tables: Person, Building, PersonRoom, and Room with the following relevant fields.
Person: PersonID
PersonRoom: PersonID, RoomID
Room: RoomID, RoomNumber
Building: BuildingID, BuildingName
I want to get all people and if they have a building and/or room number, I want that included in the row as well. The problem is that not every person has a location, and also some people might have multiple locations.
I have tried so many permutations of joins that I don't know where to begin any more.
If anyone has any ideas or can point me in the right direction, I would SO appreciate it!
Thanks!
Person: PersonID
PersonRoom: PersonID, RoomID
Room: RoomID, RoomNumber
Building: BuildingID, BuildingName
I want to get all people and if they have a building and/or room number, I want that included in the row as well. The problem is that not every person has a location, and also some people might have multiple locations.
I have tried so many permutations of joins that I don't know where to begin any more.
If anyone has any ideas or can point me in the right direction, I would SO appreciate it!
Thanks!