IF COL_LENGTH('Crm_Turnos', 'Nro_Operacion') IS NULL 
BEGIN
	ALTER TABLE Crm_Turnos ADD Nro_Operacion VARCHAR(100)
END
GO	


IF IndexProperty(Object_Id('WebProcesos'), 'IX_WEBP_PorNroOpe', 'IndexID') IS NOT NULL
   DROP INDEX IX_WEBP_PorNroOpe ON WebProcesos
GO

CREATE INDEX IX_WEBP_PorNroOpe ON WebProcesos (Nro_Operacion)
GO


IF IndexProperty(Object_Id('Crm_Turnos'), 'IX_CTur_PorNroOpe', 'IndexID') IS NOT NULL
   DROP INDEX IX_CTur_PorNroOpe ON Crm_Turnos
GO

CREATE INDEX IX_CTur_PorNroOpe ON Crm_Turnos (Nro_Operacion)
GO