IF NOT EXISTS(SELECT * FROM	INFORMATION_SCHEMA.COLUMNS	WHERE TABLE_NAME='PDV_VD_DEV_NCC' AND COLUMN_NAME='DT_CAD_REGISTRO')
BEGIN
ALTER TABLE dbo.PDV_VD_DEV_NCC ADD
	DT_CAD_REGISTRO datetime NULL

ALTER TABLE dbo.PDV_VD_DEV_NCC ADD CONSTRAINT
	DF_PDV_VD_DEV_NCC_DT_CAD_REGISTRO DEFAULT GETDATE() FOR DT_CAD_REGISTRO
END
GO
UPDATE
	PDV_VD_DEV_NCC
SET 
	DT_CAD_REGISTRO=GETDATE()
WHERE
	DT_CAD_REGISTRO IS NULL