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


DELETE	cf_label
WHERE	table_name = 'emp_det'
AND 	column_name = 'emp_det_ldap_auth'
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, 'emp_det', 'emp_det_ldap_auth', 
		'LDAP Auth:', 
		'LDAP Auth:', 
		'LDAP Auth', 
		'LDAP Auth', 
		'0', '0', 'admin', getdate() 
FROM	cf_language 
GO

Update emp_det Set emp_det_ldap_auth = '0' where emp_det_ldap_auth IS NULL
GO