if not exists (select * FROM _columnas where tabla = 'cnt_configContrato' and columna = 'frecuencia')
begin  
INSERT INTO [dbo].[_columnas]
           ([tabla]
           ,[columna]
           ,[mostrarEnGrilla]
           ,[ordenGrilla]
           ,[requerido]
           ,[tipo]
           ,[defecto]
           ,[tamano])
     VALUES
           ('cnt_configContrato'
           ,'frecuencia'
           ,1
           ,1
           ,1
		   ,'int'
           ,'((0))'
           ,NULL)
end

if not exists (select * FROM _columnas where tabla = 'cnt_configContrato' and columna = 'cadaN')
begin  
INSERT INTO [dbo].[_columnas]
           ([tabla]
           ,[columna]
           ,[mostrarEnGrilla]
           ,[ordenGrilla]
           ,[requerido]
           ,[tipo]
           ,[defecto]
           ,[tamano])
     VALUES
           ('cnt_configContrato'
           ,'cadaN'
           ,1
           ,1
           ,1
           ,'float'
           ,'((0))'
           ,NULL)
end

if not exists (select * FROM _columnas where tabla = 'cnt_configContrato' and columna = 'dia')
begin  
INSERT INTO [dbo].[_columnas]
           ([tabla]
           ,[columna]
           ,[mostrarEnGrilla]
           ,[ordenGrilla]
           ,[requerido]
           ,[tipo]
           ,[defecto]
           ,[tamano])
     VALUES
           ('cnt_configContrato'
           ,'dia'
           ,1
           ,1
           ,1
           ,'int'
           ,'((0))'
           ,NULL)
end

if not exists (select * FROM _columnas where tabla = 'cnt_configContrato' and columna = 'estrategia')
begin  
INSERT INTO [dbo].[_columnas]
           ([tabla]
           ,[columna]
           ,[mostrarEnGrilla]
           ,[ordenGrilla]
           ,[requerido]
           ,[tipo]
           ,[defecto]
           ,[tamano])
     VALUES
           ('cnt_configContrato'
           ,'estrategia'
           ,1
           ,1
           ,1
           ,'int'
           ,'((0))'
           ,NULL)
end

if not exists (select * FROM _columnas where tabla = 'cnt_configContrato' and columna = 'porTrabajo')
begin  
INSERT INTO [dbo].[_columnas]
           ([tabla]
           ,[columna]
           ,[mostrarEnGrilla]
           ,[ordenGrilla]
           ,[requerido]
           ,[tipo]
           ,[defecto]
           ,[tamano])
     VALUES
           ('cnt_configContrato'
           ,'porTrabajo'
           ,1
           ,1
           ,1
           ,'bit'
           ,'((0))'
           ,NULL)
end

if not exists (select * FROM _columnas where tabla = 'cnt_configContrato' and columna = 'incluirMenores')
begin  
INSERT INTO [dbo].[_columnas]
           ([tabla]
           ,[columna]
           ,[mostrarEnGrilla]
           ,[ordenGrilla]
           ,[requerido]
           ,[tipo]
           ,[defecto]
           ,[tamano])
     VALUES
           ('cnt_configContrato'
           ,'incluirMenores'
           ,1
           ,1
           ,1
           ,'bit'
           ,'((0))'
           ,NULL)
end

if not exists (select * FROM _columnas where tabla = 'cnt_configContrato' and columna = 'aproximarA')
begin  
INSERT INTO [dbo].[_columnas]
           ([tabla]
           ,[columna]
           ,[mostrarEnGrilla]
           ,[ordenGrilla]
           ,[requerido]
           ,[tipo]
           ,[defecto]
           ,[tamano])
     VALUES
           ('cnt_configContrato'
           ,'aproximarA'
           ,1
           ,1
           ,1
           ,'int'
           ,'((0))'
           ,NULL)
end

if not exists (select * FROM _columnas where tabla = 'cnt_configContrato' and columna = 'fecha_ff')
begin  
INSERT INTO [dbo].[_columnas]
           ([tabla]
           ,[columna]
           ,[mostrarEnGrilla]
           ,[ordenGrilla]
           ,[requerido]
           ,[tipo]
           ,[defecto]
           ,[tamano])
     VALUES
           ('cnt_configContrato'
           ,'fecha_ff'
           ,1
           ,1
           ,1
           ,'smalldatetime'
           ,'(getdate())'
           ,NULL)
end

if not exists (select * FROM _columnas where tabla = 'cnt_configContrato' and columna = 'diaHabil')
begin  
INSERT INTO [dbo].[_columnas]
           ([tabla]
           ,[columna]
           ,[mostrarEnGrilla]
           ,[ordenGrilla]
           ,[requerido]
           ,[tipo]
           ,[defecto]
           ,[tamano])
     VALUES
           ('cnt_configContrato'
           ,'diaHabil'
           ,1
           ,1
           ,1
           ,'int'
           ,'((0))'
           ,NULL)
end

if not exists (select * FROM _columnas where tabla = 'cnt_visitaFija' and columna = 'id_configContrato')
begin  
INSERT INTO [dbo].[_columnas]
           ([tabla]
           ,[columna]
           ,[mostrarEnGrilla]
           ,[ordenGrilla]
           ,[requerido]
           ,[tipo]
           ,[defecto]
           ,[tamano])
     VALUES
           ('cnt_visitaFija'
           ,'id_configContrato'
           ,1
           ,1
           ,1
		   ,'int'
           ,'((0))'
           ,NULL)
end