dbTalk Databases Forums  

Reading extra rows of Excel data file into SQL Server table

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


Discuss Reading extra rows of Excel data file into SQL Server table in the microsoft.public.sqlserver.dts forum.



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

Default Reading extra rows of Excel data file into SQL Server table - 04-15-2004 , 02:36 PM






When importing Excel data into a SQL Server table,
sometime DTS/Enterprise Manager tries to read one more
empty row. This causes an 'not Null allowed' error for
the PK column.

Also, sometimes when previewing the source data, data in
some cells were missing. This also caused an "not Null
allowed" error.

How can I prevent these errors? How do I prepare a
perfect Excel data file for importing Excel data into SQL
Server?

Thanks In Advance.

Jeffrey

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

Default Re: Reading extra rows of Excel data file into SQL Server table - 04-15-2004 , 02:46 PM






The reason DTS tries to import a last row is because there is a row but
there just isn't data therein. You can Delete this row from the Excel file.

For Nulls do you mean this

Excel Inserts Null Values
(http://www.sqldts.com/default.aspx?254)

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Jeffrey" <jwang (AT) dot (DOT) state.tx.us> wrote

Quote:
When importing Excel data into a SQL Server table,
sometime DTS/Enterprise Manager tries to read one more
empty row. This causes an 'not Null allowed' error for
the PK column.

Also, sometimes when previewing the source data, data in
some cells were missing. This also caused an "not Null
allowed" error.

How can I prevent these errors? How do I prepare a
perfect Excel data file for importing Excel data into SQL
Server?

Thanks In Advance.

Jeffrey



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.