--select * from wrk_sts
IF NOT EXISTS (
    SELECT * 
    FROM sys.columns 
    WHERE object_id = OBJECT_ID('wrk_sts') 
    AND name = 'wrk_sts_cm_ack_req'
)
BEGIN
    ALTER TABLE wrk_sts
    ADD wrk_sts_cm_ack_req varchar(1) NULL
END


DELETE	cf_label
WHERE	table_name = 'wrk_sts'
AND 	column_name = 'wrk_sts_cm_ack_req'
GO

INSERT 	cf_label (language_cd, table_name, column_name, 
		default_label,
		customize_label, 
		default_header, 
		customize_header, 
		cfr_flag, cf_label_required, audit_user, audit_date ) 
SELECT 	language_cd, 'wrk_sts', 'wrk_sts_cm_ack_req', 
		'CM Acknowledge Require:', 
		'CM Acknowledge Require:', 
		'CM Acknowledge Require', 
		'CM Acknowledge Require', 
		'0', '0', 'admin', getdate() 
FROM	cf_language 
GO


Update wrk_sts set wrk_sts_cm_ack_req = '0' where wrk_sts_cm_ack_req IS NULL
GO

IF NOT EXISTS (
    SELECT * 
    FROM sys.columns 
    WHERE object_id = OBJECT_ID('wrk_sts') 
    AND name = 'wrk_sts_pm_ack_req'
)
BEGIN
    ALTER TABLE wrk_sts
    ADD wrk_sts_pm_ack_req varchar(1) NULL
END


DELETE	cf_label
WHERE	table_name = 'wrk_sts'
AND 	column_name = 'wrk_sts_pm_ack_req'
GO

--
INSERT 	cf_label (language_cd, table_name, column_name, 
		default_label,
		customize_label, 
		default_header, 
		customize_header, 
		cfr_flag, cf_label_required, audit_user, audit_date ) 
SELECT 	language_cd, 'wrk_sts', 'wrk_sts_pm_ack_req', 
		'PM Acknowledge Require:', 
		'PM Acknowledge Require:', 
		'PM Acknowledge Require', 
		'PM Acknowledge Require', 
		'0', '0', 'admin', getdate() 
FROM	cf_language 
GO


Update wrk_sts set wrk_sts_pm_ack_req = '0' where wrk_sts_pm_ack_req IS NULL
GO


