troubleshooting Question

How to update multiple records in a column with value "NULL"?

Avatar of Eric Bourland
Eric BourlandFlag for United States of America asked on
ColdFusion Language
2 Comments1 Solution341 ViewsLast Modified:
ColdFusion 9
MS SQL Server 2005

* I have a table, tbl_Document_Has_Topic, with 923 records.

* That table has column DocumentTopicID.

* In 422 records, column DocumentTopicID has value: 3

In column DocumentTopicID I want to replace all values "3" with values "NULL". I don't want to edit each record. Is there an UPDATE command that I can use, to update this table column?

Does this look right to you?

UPDATE tbl_Document_Has_Topic
SET DocumentTopicID = "NULL"
WHERE     (DocumentTopicID = 3)

This table is in production; I am trying to undo the client's repetitive work to populate column DocumentTopicID with value = 3. I wanted to run this by some experts before I proceed. I have made a backup of the table. I am using SQL Server Studio Manager 2005 to edit the database.

Thanks as always.

Eric B
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros