dbTalk Databases Forums  

DTS Import Wizard trys to Insert NULL into Identity field

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


Discuss DTS Import Wizard trys to Insert NULL into Identity field in the microsoft.public.sqlserver.dts forum.



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

Default DTS Import Wizard trys to Insert NULL into Identity field - 05-24-2005 , 03:26 PM






I'm importing from Text (file) into a table that consists of 83 varchar
fields, then an Identity field. The source file has no ID field, just CSV
data ( max 83 fields ). In the Import Wizard as soon as I specify the field
delimiter ( comma ) the display shows that all unspecified ( in the input )
fields are filled with NULL. I believe the default NULL is biting me when it
gets to the Identity field which can't have a NULL.
Is there a way to prevent the NULL from being inserted -- at least in the ID
field?
I don't care about any of the actual data fields since I parse the data later.
Thanks -- jack

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

Default Re: DTS Import Wizard trys to Insert NULL into Identity field - 05-24-2005 , 04:22 PM






Have a look here and see if it helps.

I very very very (did I mention very) rarely use the wizard so am unsure
where and if these options (in the link) are available there. If not
then instead of executing the wizard package, save it edit it and look.

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

Allan

"hushtech" <hushtech (AT) discussions (DOT) microsoft.com> wrote


Quote:
I'm importing from Text (file) into a table that consists of 83 varchar
fields, then an Identity field. The source file has no ID field, just CSV
data ( max 83 fields ). In the Import Wizard as soon as I specify the field
delimiter ( comma ) the display shows that all unspecified ( in the input )
fields are filled with NULL. I believe the default NULL is biting me when it
gets to the Identity field which can't have a NULL.
Is there a way to prevent the NULL from being inserted -- at least in the ID
field?
I don't care about any of the actual data fields since I parse the data later.
Thanks -- jack


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

Default Re: DTS Import Wizard trys to Insert NULL into Identity field - 05-24-2005 , 08:46 PM



Allan,
I used the DTS Designer and your Tutorial at www.spldts.com and it all came
clear. I now can import my CSV file into a table with an Identity field
perfectly.
I'd recommend the tutorials to everyone who is just getting started with
DTS. For
cases where its a straight 1:1 map with nothing special you could get by
with the DTS Wizard, but for everything else the DTS Designer is the way to
go.
Thanks for the great help -- jack

"Allan Mitchell" wrote:

Quote:
Have a look here and see if it helps.

I very very very (did I mention very) rarely use the wizard so am unsure
where and if these options (in the link) are available there. If not
then instead of executing the wizard package, save it edit it and look.

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

Allan

"hushtech" <hushtech (AT) discussions (DOT) microsoft.com> wrote in message
news:hushtech (AT) discussions (DOT) microsoft.com:

I'm importing from Text (file) into a table that consists of 83 varchar
fields, then an Identity field. The source file has no ID field, just CSV
data ( max 83 fields ). In the Import Wizard as soon as I specify the field
delimiter ( comma ) the display shows that all unspecified ( in the input )
fields are filled with NULL. I believe the default NULL is biting me when it
gets to the Identity field which can't have a NULL.
Is there a way to prevent the NULL from being inserted -- at least in the ID
field?
I don't care about any of the actual data fields since I parse the data later.
Thanks -- jack



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.