bulk update query using sql server

5 pts.
Tags:
SQL Server 2005
SQL Server 2005 administration
SQL Server 2005 Database
Hi ,

We need a way using sql server  for updating more than one rows at a time .

Thanks ,

Pramod.

 

Answer Wiki

Thanks. We'll let you know when a new response is added.

You would need to insert all the rows into a staging table, then update from the staging table to the destination table.

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Cyphersimian
    Isn't this the standard for DMS's ??? Can you offer a bit more detail...
    30 pointsBadges:
    report
  • carlosdl
    Yes, more details are deeded. One update statement can update any number of rows depending on the WHERE clause.
    70,190 pointsBadges:
    report
  • Meandyou
    an example of what the others are saying: UPDATE your_table SET col_a = 'Some new value' WHERE condition; ALL rows meeting "condition" in the WHERE clause will be updated. Many times the "condition" will be quite complex, so as to get all of the rows you want without getting rows you do not want. "If a WHERE clause is too restrictive, not all target rows will be updated. This problem can be avoided by eliminating the WHERE clause."
    5,220 pointsBadges:
    report
  • Pramoda
    [...] Bulk update query using sql server asked by Pramoda and answered by [...]
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following