Hope someone can help struggling to figure this one out.
I have a normal table.
Entities
- EntityID
- EntityName
- GroupType
EntityConnections
- ConnectionID
- GroupID
- EntityID
So what happens is you add a new entity into the Enitites table.
Some entities does have sub entities and therefor the main entity will also be add as GroupType = True.
So to populate in Entities table I might have the following:
Entity ID EntityName GroupType
001 PeterBoltman True
002 PeterBoltmanInc False
006 LoneyBoltmanPTY False
003 CyphonCat True
004 CyphonCatInc False
As you can see the other actually belong to the main entity.
This is somehow connected with the connections table but I haven't figured out where the GroupID is coming from.
I know that 001 is the main entity for 002 and 006.
I want to write simple query that only shows me the entities not GroupType=True, but also on the side their main entities.
EntityName GroupName
PeterBoltmanInc PeterBoltman
LoneyBoltmanPTY PeterBoltman
Any help would be greatly appreciated, I'm unable to fully understand the whole layout of the database due to the huge size of it.
I have a normal table.
Entities
- EntityID
- EntityName
- GroupType
EntityConnections
- ConnectionID
- GroupID
- EntityID
So what happens is you add a new entity into the Enitites table.
Some entities does have sub entities and therefor the main entity will also be add as GroupType = True.
So to populate in Entities table I might have the following:
Entity ID EntityName GroupType
001 PeterBoltman True
002 PeterBoltmanInc False
006 LoneyBoltmanPTY False
003 CyphonCat True
004 CyphonCatInc False
As you can see the other actually belong to the main entity.
This is somehow connected with the connections table but I haven't figured out where the GroupID is coming from.
I know that 001 is the main entity for 002 and 006.
I want to write simple query that only shows me the entities not GroupType=True, but also on the side their main entities.
EntityName GroupName
PeterBoltmanInc PeterBoltman
LoneyBoltmanPTY PeterBoltman
Any help would be greatly appreciated, I'm unable to fully understand the whole layout of the database due to the huge size of it.