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

DELETE	cf_label
WHERE	table_name = 'wko_det'
AND 	column_name = 'wko_det_assign_to2'
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, 'wko_det', 'wko_det_assign_to2', 
		'Assign To 2:', 
		'Assign To 2:', 
		'Assign To 2', 
		'Assign To 2', 
		'0', '0', 'admin', getdate() 
FROM	cf_language 
GO



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

DELETE	cf_label
WHERE	table_name = 'wko_det'
AND 	column_name = 'wko_det_assign_to3'
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, 'wko_det', 'wko_det_assign_to3', 
		'Assign To 3:', 
		'Assign To 3:', 
		'Assign To 3', 
		'Assign To 3', 
		'0', '0', 'admin', getdate() 
FROM	cf_language 
GO



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

DELETE	cf_label
WHERE	table_name = 'wko_det'
AND 	column_name = 'wko_det_assign_to4'
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, 'wko_det', 'wko_det_assign_to4', 
		'Assign To 4:', 
		'Assign To 4:', 
		'Assign To 4', 
		'Assign To 4', 
		'0', '0', 'admin', getdate() 
FROM	cf_language 
GO


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

DELETE	cf_label
WHERE	table_name = 'wko_det'
AND 	column_name = 'wko_det_assign_to5'
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, 'wko_det', 'wko_det_assign_to5', 
		'Assign To 5:', 
		'Assign To 5:', 
		'Assign To 5', 
		'Assign To 5', 
		'0', '0', 'admin', getdate() 
FROM	cf_language 
GO



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

DELETE	cf_label
WHERE	table_name = 'wko_det'
AND 	column_name = 'wko_det_assign_to6'
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, 'wko_det', 'wko_det_assign_to6', 
		'Assign To 6:', 
		'Assign To 6:', 
		'Assign To 6', 
		'Assign To 6', 
		'0', '0', 'admin', getdate() 
FROM	cf_language 
GO



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

DELETE	cf_label
WHERE	table_name = 'wko_det'
AND 	column_name = 'wko_det_assign_to7'
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, 'wko_det', 'wko_det_assign_to7', 
		'Assign To 7:', 
		'Assign To 7:', 
		'Assign To 7', 
		'Assign To 7', 
		'0', '0', 'admin', getdate() 
FROM	cf_language 
GO



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

DELETE	cf_label
WHERE	table_name = 'wko_det'
AND 	column_name = 'wko_det_assign_to8'
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, 'wko_det', 'wko_det_assign_to8', 
		'Assign To 8:', 
		'Assign To 8:', 
		'Assign To 8', 
		'Assign To 8', 
		'0', '0', 'admin', getdate() 
FROM	cf_language 
GO



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

DELETE	cf_label
WHERE	table_name = 'wko_det'
AND 	column_name = 'wko_det_assign_to9'
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, 'wko_det', 'wko_det_assign_to9', 
		'Assign To 9:', 
		'Assign To 9:', 
		'Assign To 9', 
		'Assign To 9', 
		'0', '0', 'admin', getdate() 
FROM	cf_language 
GO

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

DELETE	cf_label
WHERE	table_name = 'wko_det'
AND 	column_name = 'wko_det_assign_to10'
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, 'wko_det', 'wko_det_assign_to10', 
		'Assign To 10:', 
		'Assign To 10:', 
		'Assign To 10', 
		'Assign To 10', 
		'0', '0', 'admin', getdate() 
FROM	cf_language 
GO
