CREATE TABLE [dbo].[Blah](
[RunGUID] [uniqueidentifier] NOT NULL,
[S199] [float] NULL,
[S198] [float] NULL,
) ON [PRIMARY]
--- With the below FK it breaks, removing it fixes
ALTER TABLE [dbo].[BLAH] WITH CHECK ADD CONSTRAINT [FK_Blah_Run] FOREIGN KEY([RunGUID])
REFERENCES [dbo].[Run] ([RunGUID])
GO
ALTER TABLE [dbo].[Blah] CHECK CONSTRAINT [FK_Blah_Run]
The bulk method creates an additional column when trying to bulk insert into a table with a foreign key
Expected behaviour:
The insert prepared statement to be the below
insert into [FAKEDB].[dbo].[Blah] ( [RunGUID], [S199], [S198] ) values ( ?, ?, ? )
Actual behaviour:
insert into [FAKEDB].[dbo].[Blah] ( [RunGUID], [RunGUID], [S199], [S198] ) values ( ?, ?, ?, ? )
Configuration:
Software versions