dbTalk Databases Forums  

newbie: import certain number of rows from excel sheet

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


Discuss newbie: import certain number of rows from excel sheet in the microsoft.public.sqlserver.dts forum.



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

Default newbie: import certain number of rows from excel sheet - 12-09-2003 , 12:51 PM






I am new to DTS.
I have an excel sheet with 4 columns, 101 rows,
corresponding to a table in sql server database.
column1 is pk in table. when I use DTS Import/Export
wizard to import data from spread sheet, I always get
an error saying that Error during
Transformation 'DirectCopyXform' for Row number
101...Destination does not
allow NULL on the column1, and I didn't get all 100 rows
imported in the table.
The row 101 and the remaining rows in spread sheet is
blank, and it seems that the import process
was keep going with the blank rows and therefore
generated "does not allow NULL on the column1" error.
How do I tell it to stop at row 100?

thanks!

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

Default Re: newbie: import certain number of rows from excel sheet - 12-09-2003 , 02:02 PM






Try deleting that row. Although it may look blank perhaps it has a " " in
it.

--

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


"amy" <achen (AT) comverge (DOT) com> wrote

Quote:
I am new to DTS.
I have an excel sheet with 4 columns, 101 rows,
corresponding to a table in sql server database.
column1 is pk in table. when I use DTS Import/Export
wizard to import data from spread sheet, I always get
an error saying that Error during
Transformation 'DirectCopyXform' for Row number
101...Destination does not
allow NULL on the column1, and I didn't get all 100 rows
imported in the table.
The row 101 and the remaining rows in spread sheet is
blank, and it seems that the import process
was keep going with the blank rows and therefore
generated "does not allow NULL on the column1" error.
How do I tell it to stop at row 100?

thanks!



Reply With Quote
  #3  
Old   
Billy Yao [MSFT]
 
Posts: n/a

Default Re: newbie: import certain number of rows from excel sheet - 12-09-2003 , 10:12 PM



Hello Amy,

I agree with Allan that there may be blank existed in that row. Please try to delete it and see if
the DTS can be successfull. If it also doesn't work , please send that problematic Excel file to
v-binyao (AT) microsoft (DOT) com. In this way, I can reproduce the issue on my side with your detailed
information. Thank you for using MSDN Newsgroup!

Best regards,

Billy Yao
Microsoft Online Support
----------------------------------------------------
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.



Reply With Quote
  #4  
Old   
amy
 
Posts: n/a

Default Re: newbie: import certain number of rows from excel sheet - 12-10-2003 , 06:31 AM



It works , thanks Allan and Billy !

Quote:
-----Original Message-----
Hello Amy,

I agree with Allan that there may be blank existed in
that row. Please try to delete it and see if
the DTS can be successfull. If it also doesn't work ,
please send that problematic Excel file to
v-binyao (AT) microsoft (DOT) com. In this way, I can reproduce the
issue on my side with your detailed
information. Thank you for using MSDN Newsgroup!

Best regards,

Billy Yao
Microsoft Online Support
----------------------------------------------------
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and
confers no rights.
Please reply to newsgroups only. Thanks.


.


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.