all groups > sql server dts > december 2005 >
You're in the

sql server dts

group:

Importing data from Excel



Importing data from Excel pmud
12/12/2005 9:26:01 PM
sql server dts: Hi,

I am trting to import data from many spreadheets. The first column in the
sheets is the serial No. So, after importing the data from teh first
workbook, I made the first column as Auto-incrementing and also made it the
primary key, so that we didnt have the same No for different rows.

But now when I try to import the data from the secong workbook, i get
message, " Cannot insert duplicate data into the primary key."

How can i make the first column an auto incrementing column in the db so
that every time i import many rows of data ,the first column in auto
incremented..

Please help.

Thanks
--
RE: Importing data from Excel pmud
12/12/2005 9:40:03 PM
The exact error message I am getting is :

"Error at destination for row no. 968.Errors encountered in this task so
far:1. The atatement ahs been terminated.Violation of PRIMARY KEY constraint
PK_New09#05$.Cannot insert duplicate key in 'InternalLogs'."

Any help is appreciated.

Thanks

--
pmud


[quoted text, click to view]
RE: Importing data from Excel mattb
12/13/2005 1:41:28 PM


[quoted text, click to view]

increment your numbers in your spreadsheets. Then use "transform data task"
in dts package to import.
AddThis Social Bookmark Button