IF NOt EXISTS( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'ter_contacto' AND  COLUMN_NAME = 'codigoAcceso')
	alter table [ter_contacto] add [codigoAcceso] varchar(300) DEFAULT ' '
go

IF NOT EXISTS(SELECT *FROM [_columnas] WHERE[tabla]='ter_contacto' AND [columna]='codigoAcceso' AND[mostrarEnGrilla]=0 AND[ordenGrilla]=0 AND[requerido]=0 AND[tipo]='varchar' AND[defecto]=' ' AND [tamano] = 300)
BEGIN
INSERT INTO [_columnas]
([tabla] ,[columna] ,[mostrarEnGrilla],[ordenGrilla],[requerido] ,[tipo],[defecto],[tamano])
 VALUES
 ('ter_contacto' ,'codigoAcceso',0 ,0 ,0 ,'varchar' ,' ' ,300)
END
