
IF NOT EXISTS (SELECT * FROM SYS.COLUMNS WHERE NAME = 'FLAG_GERAR_CROSS' AND OBJECT_ID = OBJECT_ID('EST_PED_ELTR_DEMANDA'))
begin	
ALTER TABLE dbo.EST_PED_ELTR_DEMANDA ADD
	FLAG_GERAR_CROSS int NULL
ALTER TABLE dbo.EST_PED_ELTR_DEMANDA ADD CONSTRAINT
	DF_EST_PED_ELTR_DEMANDA_FLAG_GERAR_CROSS DEFAULT 0 FOR FLAG_GERAR_CROSS
end