SQL – Cleaning Up Records in Custom Table

email me

This is some SQL code I’m using to clean up some records…it removes unwanted data from a specified table.

USE [CM_001]
GO

UPDATE dbo.Custom_Custom_DATA
SET Bitlocker_D_Drive00 = ''
WHERE Bitlocker_D_Drive00 = 'The parameter is incorrect.'
GO

UPDATE dbo.Custom_Custom_DATA
SET Bitlocker_C_Drive00 = ''
WHERE Bitlocker_C_Drive00 = 'ERROR: No key protectors found.'
GO

UPDATE dbo.Custom_Custom_DATA
SET Bitlocker_C_Drive00 = ''
WHERE Bitlocker_C_Drive00 = 'A system shutdown is in progress.'
GO

UPDATE dbo.Custom_Custom_DATA
SET Bitlocker_D_Drive00 = ''
WHERE Bitlocker_D_Drive00 = 'A system shutdown is in progress.'
GO
UPDATE dbo.Custom_Custom_DATA
SET Bitlocker_C_Drive00 = ''
WHERE Bitlocker_C_Drive00 = 'ERROR: No key protectors found.'
GO

UPDATE dbo.Custom_Custom_DATA
SET Bitlocker_D_Drive00 = ''
WHERE Bitlocker_D_Drive00 = 'ERROR: No key protectors found.'
GO
UPDATE dbo.Custom_Custom_DATA
SET Bitlocker_C_Drive00 = ''
WHERE Bitlocker_C_Drive00 = 'ECHO is on.'
GO

UPDATE dbo.Custom_Custom_DATA
SET Bitlocker_D_Drive00 = ''
WHERE Bitlocker_D_Drive00 = 'ECHO is on.'
GO