all groups > sql server dts > january 2005 >
You're in the

sql server dts

group:

loading text comma delimited data


loading text comma delimited data Edward Letendre
1/27/2005 2:47:02 PM
sql server dts:
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.
RE: loading text comma delimited data Nigel Rivett
1/29/2005 1:43:03 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.


[quoted text, click to view]
AddThis Social Bookmark Button