Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Bulk Update #51

Closed
iambudi opened this issue Jun 9, 2020 · 5 comments
Closed

Question: Bulk Update #51

iambudi opened this issue Jun 9, 2020 · 5 comments
Labels

Comments

@iambudi
Copy link

iambudi commented Jun 9, 2020

Is there a way to do bulk update just like bulk insert?

@iambudi
Copy link
Author

iambudi commented Jun 10, 2020

Using BULK UPDATE works just like BULK INSERT. Will update the status later if no issue.

@stfnmllr
Copy link
Contributor

Yes, since one of the last versions 'bulk' is not restricted to insert only. Anyway, documentation was not changed as in general SQL updates do work on sets of records unlike insert, which adds only one record to the DB at one time. Would be great if you can share your use case for which you do need bulk operations for DB updates - thanks in advance.

@iambudi
Copy link
Author

iambudi commented Jun 11, 2020

The use case:

I need to compile sales data from two different data sources into a single table for reporting.
First source will provide data on daily basis, while the other one on monthly basis (closing period).
So the data stored from first source will be updated massively by data coming from the second source.

I consider to put each in seperate tables using BULK INSERT and create Join View, but since only few columns to update, i decided to use BULK UPDATE.

@stfnmllr
Copy link
Contributor

Thanks - I guess the update needs to be done on single records so no mass / set operation by the where clause cannot be used.
Did the 'bulk statement' for update work?
Most probably you use it because of performance considerations. If performance is an issue you might think about a stored procedure solution as well.

@iambudi
Copy link
Author

iambudi commented Jun 29, 2020

Hi @stfnmllr so far the bulk statement for update works nicely. I can close this question issue. Thank you.

@iambudi iambudi closed this as completed Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants