dbTalk Databases Forums  

Error handling in DataPump

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


Discuss Error handling in DataPump in the microsoft.public.sqlserver.dts forum.



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

Default Error handling in DataPump - 09-23-2004 , 01:09 PM






I have a problem with a duplicate key. The input to the datapump is a large
txt file, the output is a SQL table with primary keys defined. I'd like to
simply drop any rows which are duplicated on the input (i.e. I'll take the
first input, and discard any duplicates). I'm aware that the SQL table could
be defined without a PK, but the rest of the application depends on this
definition.
Thanks in advance.



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

Default Re: Error handling in DataPump - 09-23-2004 , 01:27 PM






OK the easiest way to do it would be to load the text file into a staging
SQL Server tble and then use TSQL to only load unique rows.

Have a look here also

http://www.mssqlserver.com/faq/development-duprows.asp


"George Morton" <gmorton1 (AT) optonline (DOT) net> wrote

Quote:
I have a problem with a duplicate key. The input to the datapump is a large
txt file, the output is a SQL table with primary keys defined. I'd like to
simply drop any rows which are duplicated on the input (i.e. I'll take the
first input, and discard any duplicates). I'm aware that the SQL table
could
be defined without a PK, but the rest of the application depends on this
definition.
Thanks in advance.





Reply With Quote
  #3  
Old   
Ilya Margolin
 
Posts: n/a

Default Re: Error handling in DataPump - 09-24-2004 , 08:05 AM



George,

One way to do it would be to load your text file into a staging table set up
with a unique index and ignore duplicate keys option enabled.

Ilya

"George Morton" <gmorton1 (AT) optonline (DOT) net> wrote

Quote:
I have a problem with a duplicate key. The input to the datapump is a
large
txt file, the output is a SQL table with primary keys defined. I'd like to
simply drop any rows which are duplicated on the input (i.e. I'll take the
first input, and discard any duplicates). I'm aware that the SQL table
could
be defined without a PK, but the rest of the application depends on this
definition.
Thanks in advance.





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.