Need a SQL query to replace values in a certain field

Posted on 2007-07-30
Medium Priority
Last Modified: 2010-05-18
I need to update a table in SQL 2000. I have a table named table1 and a field named staff. I would like use a query to change all the values under staff that has a value of 'bc' to 'vs'. Seems like it should be fairly simple but I have just started working with SQL.
Question by:grahamis
LVL 143

Accepted Solution

Guy Hengel [angelIII / a3] earned 200 total points
ID: 19593616
update table1
  set staff = 'vs'
where staff = 'bc'

Author Comment

ID: 19593890
That worked perfect. Thank you very much

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question