dbTalk Databases Forums  

DTS Import from Excel

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


Discuss DTS Import from Excel in the microsoft.public.sqlserver.dts forum.



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

Default DTS Import from Excel - 02-23-2005 , 10:46 AM






I'm trying to import an Excel 2000 file into a SQL Server 2000 table. The
Excel file has 4 columns. The database table mirrors these columns but has
an Identity field (called ID) which I have as PK to satisfy replication
requirements. Also there is the replication field that defaults to newid().
These 2 fields are the last 2 in the table schema. Here's the error I get
when executing the package...

Error at Destination for Row number 5508...
Cannot insert the value NULL into column 'ID' table.....;column does not
allow nulls. INSERT fails.

There are 5508 rows of data in the sheet plus row 1 is column header.

I realize I can import this into a temp table then just run a SQL query to
insert into the other table, but I'm just curious about the error and would
prefer to not have the temp table.

Thanks - Tom



Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: DTS Import from Excel - 02-24-2005 , 12:34 AM






You may be experiencing this problem

Problems With IDENTITY() and the DataPump task.
(http://www.sqldts.com/default.aspx?293)



"Tom Gaughan" <tgaughan (AT) numail (DOT) org> wrote

Quote:
I'm trying to import an Excel 2000 file into a SQL Server 2000 table.
The
Excel file has 4 columns. The database table mirrors these columns but
has
an Identity field (called ID) which I have as PK to satisfy replication
requirements. Also there is the replication field that defaults to
newid().
These 2 fields are the last 2 in the table schema. Here's the error I
get
when executing the package...

Error at Destination for Row number 5508...
Cannot insert the value NULL into column 'ID' table.....;column does not
allow nulls. INSERT fails.

There are 5508 rows of data in the sheet plus row 1 is column header.

I realize I can import this into a temp table then just run a SQL query
to
insert into the other table, but I'm just curious about the error and
would
prefer to not have the temp table.

Thanks - Tom


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.