March 26, 2012 at 8:58 am
Hi
I'm using the SQL Server Import&Export tool to update records by deleting the existing table and I'm getting the error below:
TITLE: SQL Server Import and Export Wizard
------------------------------
Error 0xc002f210: Preparation SQL Task 1: Executing the query "TRUNCATE TABLE [dbo].[Output] " failed with the following error: "Cannot truncate table 'dbo.Output' because it is being referenced by a FOREIGN KEY constraint.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Is there a walkaround this error without dropping the FOREIGN KEY constraint?
Please assist.
Thanks
Thami
March 26, 2012 at 9:20 am
Yes, there is. Use DELETE FROM yourtable.
March 27, 2012 at 12:40 am
Hi Lynn
In the import&export wizard I'm selecting the option to "DELETE FROM the existing table" and I get the same error.
Thanks
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply