

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