artful at rogers.com
artful at rogers.com
Mon Oct 30 18:50:35 CST 2006
You say that it fails at the very end. That suggests that maybe there is a CRLF on the last line, and the failure occurs on the "next" line. Does the whole job abort when it hits the failure, or do you get all the rows but the last one, or what? Are you doing this with DTS? ----- Original Message ---- From: JWColby <jwcolby at colbyconsulting.com> To: dba-sqlserver at databaseadvisors.com; Access Developers discussion and problem solving <accessd at databaseadvisors.com> Sent: Monday, October 30, 2006 7:10:47 PM Subject: [dba-SQLServer] Appending data to SQL Server table with identity field I am trying to append data from a CSV file to an existing table with a PK integer field (4 bytes) that is an identity, seed 1, increment 1. The append fails at the very end saying it can't append a null to the PK field. Does an identity not increment in the same manner that an autonumber does in Access? If so any ideas why this is failing? If not, any ideas how to cause this to happen. I hate to import to a table without the PK, and then append to the table with the PK. I have tried that and THAT does work. What is it about the import from CSV that is causing this failure? John W. Colby Colby Consulting www.ColbyConsulting.com _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com