

IF NOT EXISTS(SELECT *FROM [_columnas] WHERE[tabla]='cnt_contratoDetalleVisita'
      AND [columna]='diaHabil' AND[mostrarEnGrilla]=1 AND[ordenGrilla]=1 AND[requerido]=1 AND[tipo]='int'AND[defecto]=0 AND [tamano] IS NULL)
BEGIN
INSERT INTO [_columnas]
([tabla] ,[columna] ,[mostrarEnGrilla],[ordenGrilla],[requerido] ,[tipo],[defecto],[tamano])
 VALUES
 ('cnt_contratoDetalleVisita' ,'diaHabil',1 ,1 ,1 ,'int' ,0 ,null)
END

