dbTalk Databases Forums  

Importing data from Excel

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Importing data from Excel in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
pmud
 
Posts: n/a

Default Importing data from Excel - 12-12-2005 , 11:26 PM






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
--
pmud

Reply With Quote
  #2  
Old   
pmud
 
Posts: n/a

Default RE: Importing data from Excel - 12-12-2005 , 11:40 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


"pmud" wrote:

Quote:
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
--
pmud

Reply With Quote
  #3  
Old   
mattb
 
Posts: n/a

Default RE: Importing data from Excel - 12-13-2005 , 03:41 PM





"pmud" wrote:

Quote:
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
--
pmud
increment your numbers in your spreadsheets. Then use "transform data task"
in dts package to import.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.