I have two practice tables I have created and want to export the values of one into the source table. I want to know if I can export into a table and have the destination table automatically give a primary key value to a record? I haven't been able to figure this out even after fiddling with the "Enable identity insert" checkbox under the Column Mappings tab. I have created source tables with and without primary keys and neither works because of the fact that I need to have a value for a primary key in order to INSERT into the destination.
Do I have to copy the source records into a staging table and assign the PK values myself by hand? This can't be the answer.
ddaveyou have to clear the enable identity insert checkbox if you want to allow the identity values to be poped by you
adding a check indicates that you want to programmatically provide the identity values
try clearing it and setting your identity on the column|||Thanks. I did do as you mention but I also had to create the destination table with a Primary Key with an identity field that incremented automatically by 1. I also had to create a source table that had NO primary key field. I then imported the source into the destination and the incoming rows were assigned Primary Key values in sequence.
ddave
you have to clear the enable identity insert checkbox if you want to allow the identity values to be poped by you
adding a check indicates that you want to programmatically provide the identity values
try clearing it and setting your identity on the column
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment