I have also asked this question on Stack Overflow (apologies if this is a breach of protocol).
I am migrating an MS Access database to MS SQL Server where I will maintain it using SQL Server Management Studio (SSMS).
The Access db has a relationship that connects two instances of the same table via an intermediary table as indicated by the following access relationship diagram.
This entity relationship enables the representation of the organization structure.
Access lets you create the relationship above using drag and drop and automatically added the suffix _1 to distinguish the added instance.
The SQL is:
SELECT [T-Organisation].[Organisation Unit Id],
[T-Organisation].[Organisation UnitName],
[T-Organisation_1].[Organisation Unit Id],
[T-Organisation_1].[Organisation UnitName]
FROM ([T-Organisation]
INNER JOIN [T-OrganisationSubsidiary] ON
[T-Organisation].[Organisation Unit Id] = [T-OrganisationSubsidiary].[Parent Organisation Unit])
INNER JOIN [T-Organisation] AS [T-Organisation_1] ON
[T-OrganisationSubsidiary].[Subsidiary Organisation Unit] = [T-Organisation_1].[Organisation Unit Id];
Unless I am missing something SSMS doesn’t permit me to add (drag and drop) copies of tables to the Relationship Diagram like Access does. Does this mean I need to create a physical copy of the T-Organisation table and manually name it e.g., T-Organisation_1 or is there a better solution?