dbTalk Databases Forums  

loading text comma delimited data

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


Discuss loading text comma delimited data in the microsoft.public.sqlserver.dts forum.



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

Default loading text comma delimited data - 01-27-2005 , 04:47 PM






Okay, I have 4 tables that I need to load data into. I was thinking of using
DTS to do the data load. The 4 tables already exist with old data. Some of
the data in the text files is the same as the data in the tables.

I have tried to disable to contraints on the tables and truncate the data
(remove the data, but leave the structre intact if my oracle training is
correct), but the one table with foreign key contraints will not be dropped
or turncated.

The other tables are successfully truncated and have their contraints
diabled. What else can I do to get the last table truncated and get my data
loaded, or should I even worry about truncating data before the data load.
What would happen with duplicated rows? In theory, the data could be overrun
or just added again, but I am not sure what to do.

Helo a new DBA.

Edward Letendre.


Reply With Quote
  #2  
Old   
Nigel Rivett
 
Posts: n/a

Default RE: loading text comma delimited data - 01-29-2005 , 03:43 PM






You can't truncate a table with foreign key constraints on it.
You will have to delete it instead (delete mytbl).

The import will just add rows so you would probably get PK errors if you
don't delete.


"Edward Letendre" wrote:

Quote:
Okay, I have 4 tables that I need to load data into. I was thinking of using
DTS to do the data load. The 4 tables already exist with old data. Some of
the data in the text files is the same as the data in the tables.

I have tried to disable to contraints on the tables and truncate the data
(remove the data, but leave the structre intact if my oracle training is
correct), but the one table with foreign key contraints will not be dropped
or turncated.

The other tables are successfully truncated and have their contraints
diabled. What else can I do to get the last table truncated and get my data
loaded, or should I even worry about truncating data before the data load.
What would happen with duplicated rows? In theory, the data could be overrun
or just added again, but I am not sure what to do.

Helo a new DBA.

Edward Letendre.


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.