Hi,
I have the following code;
USE [EMISDummyDB]
GO
ALTER TABLE [dbo].[Admin_Patient] WITH CHECK ADD CONSTRAINT [FK_Admin_Patient_Admin_Organisation] FOREIGN KEY([OrganisationGuid],[ExternalUsualGPOrganisation])
REFERENCES [dbo].[Admin_Organisation] ([OrganisationGuid])
GO
ALTER TABLE [dbo].[Admin_Patient] CHECK CONSTRAINT [FK_Admin_Patient_Admin_Organisation]
GO
I am trying to have one primary key (OrganisationGuid) from dbo.Admin_Organsiation with a relationship with 2 foreign keys OrganisationGuid,ExternalUsualGPOrganisation on table dbo.Admin_Patient
How can I achieve this ?
The above code give me an error -
Number of referencing columns in foreign key differs from number of referenced columns, table 'dbo.Admin_Patient'
Same error I receive when doing it via the wizard.
Thanks