How to SQL update several records in a query

1149440 pts.
Tags:
SQL
In SQL Server, I have a table that's labeled this: config_name | config_value. I'm looking to update several records in one query. Here's what I have so far:
UPDATE config 
SET t1.config_value = 'value'
  , t2.config_value = 'value2' 
WHERE t1.config_name = 'name1' 
  AND t2.config_name = 'name2';
But it's not working the way I want. What should I do?
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 2  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.
  • CharlieBrowne

    When you say it is not working, what do you mean? What is not working?

    62,385 pointsBadges:
    report
  • carlosdl
    The first thing you have to do if you need help is explaining exactly what you want it to do, and what it is actually doing.

    Without at least those details, we have no way to offer any help.
    85,015 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.

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

Following

Share this item with your network: