06 December,2014 by Tom Collins
Question: I’m using the Import and Export Wizard to transfer data and complete a Data Import from one SQL table to another SQL table. The job keeps failing with this SQL error message reported:
Messages Error 0xc0202049: Data Flow Task 1: Failure inserting into the read-only column "ItemID". (SQL Server Import and Export Wizard)
Error 0xc0202045: Data Flow Task 1: Column metadata validation failed. (SQL Server Import and Export Wizard)
It looks like I can’t import identity columns and timestamp columns. How can I fix?
Answer: The workaround for this problem is to use SET IDENTITY_INSERT ON. This code will allow values to INSERT into a table identity column.
SET IDENTITY_INSERT MyTable ON ---Complete the Import Operations ---When Data import completes set identity insert off SET IDENTITY_INSERT Mytable OFF
SQL Server – Aggregate expression containing an Outer Reference
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |