Weste
2008-01-11 02:57:41 UTC
I am trying to import data from Access into SQL Server. The primary key on
most of the tables is an Autonumber in Access and an Identity Specification
in SQL Server. The queries use INSERT INTO...SELECT...FROM syntax. I
receive a key violation when running the queries. If I follow the steps
below everything works fine.
1. Remove Identity Specification from SQL Server tables
2. Load data using queries with INSERT INTO...SELECT...FROM syntax
3. Add Identity Specification back to SQL Server tables
Is there a better way to load the data that doesn’t require removing the
Identity Specification and then adding it back? Thanks for your help.
most of the tables is an Autonumber in Access and an Identity Specification
in SQL Server. The queries use INSERT INTO...SELECT...FROM syntax. I
receive a key violation when running the queries. If I follow the steps
below everything works fine.
1. Remove Identity Specification from SQL Server tables
2. Load data using queries with INSERT INTO...SELECT...FROM syntax
3. Add Identity Specification back to SQL Server tables
Is there a better way to load the data that doesn’t require removing the
Identity Specification and then adding it back? Thanks for your help.