Hi all,
I get this error when inserting data...
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Participant_Log_BiometricInstance_Participant_Activities". The conflict occurred in database "ProvantCustomerPortal", table "dbo.Activities", column 'Id'.
The statement has been terminated.
My query looks like this
insert into [dbo].[Participant_BiometricInstance](ParticipantId, ActivityId, ProviderTypeId, Fasting, ExternalSystemId, ResultsDate, ModifiedBy, ModifiedDate)
select participantID,'','','',NULL,getdate(),NULL,getdate() from [dbo].[Participant_Profile]
union all
select '',id,'','','','','','' from [dbo].[Activities]
union all
select '','',id,'','','','','' from [dbo].[Log_ProviderType]
ParticipantID, ActivityId, ProviderTypeId are Foreign Keys.
Id is primary key in Activity table
Id is primary key in Log_ProviderType.
Does anyone know how can we solve this?