• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

BCP and Update

 
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi! Everyone,
I know this is Oracle discussion group but still I am putting question from SQL server hoping I get answer from some of you. Right now I am doing insert into table using BCP. I was wondering can I do update and delete using BCP. Can anyone can also provide me with good URL for BCP?
thanks,
Shivani
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is BCP?
Mark
 
shivani anand
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
BCP is bulk copy same as SQL Loader in Oracle
Shivani
 
Mark Spritzler
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did a Google search and found this response to someones question there.

It would take forever to copy millions of rows in one insert statement or
through VB. BCP can help you load data in bulk, but if you have some logic
involved that is making you be selective on what data to insert, then BCP is
not the answer either.


Seems from that that it is simple a bulk loader (inserts) only.
And from other cursory looks at the Newsgroup for ns-sqlserver, it doesn't appear so, but you will have to do your own search there to be positive. Remember, I don't use SQL Server.
Mark
 
Mark Spritzler
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As a different suggest, you could BCP the data into a staging table, a table that you create that matches the final destination table, then create a stored procedure that will go through the records, see if it already exists. If not insert, otherwise update.
Mark
 
shivani anand
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Mark,
Yes IO can create Stored proc to do this but that will be slow so I was thinking to do it through BCP. Thanks for your help
Shivani
reply
    Bookmark Topic Watch Topic
  • New Topic