Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Import in a table with autoincrement field

Author  Topic 

sega2
Starting Member

1 Post

Posted - 2008-10-02 : 19:17:09
I have one problem.
I have a table with 3 fields and one of them is an autoincrement, so when I try to import data from .txt file which contains data only for 2 other fields I get a mistake (Incorrent number of colums). By the other way I can't insert all 3 fields because of an autoincrement field is readonly.

Is it any way to solve this problem, what I have to do?
Thank you.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-03 : 00:11:59
if you want to ignore autoincrement field while exporting, just edit the transformation mappings so that you map only other two columns and leave identity column. However if your reqmnt is to get current identity values from text to new table, then map all columns and set property 'enable identity insert'
Go to Top of Page
   

- Advertisement -