If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > How to avoid duplication while "bcp in" ?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-01-11, 05:52
gopalmpawar gopalmpawar is offline
Registered User
 
Join Date: May 2011
Location: Pune
Posts: 16
How to avoid duplication while "bcp in" ?

Hi All,

I have a table which having some records. The file have some duplicate records and i want to "bcp in" by avoiding that duplicate records. Please help...

Thanx
Gopal
Reply With Quote
  #2 (permalink)  
Old 07-02-11, 11:19
pdreyer pdreyer is offline
Registered User
 
Join Date: May 2005
Location: South Africa
Posts: 1,268
create a unique index with ignore_dup_key
Reply With Quote
  #3 (permalink)  
Old 07-13-11, 11:34
wluk wluk is offline
Registered User
 
Join Date: Jul 2011
Posts: 2
try

-b1 -m9999999999

which will insert 1 row at a time and ignore any error 9999999999 times before abort.
Reply With Quote
  #4 (permalink)  
Old 01-24-12, 07:46
gopalmpawar gopalmpawar is offline
Registered User
 
Join Date: May 2011
Location: Pune
Posts: 16
Thanx wluk
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On