SET DEADLOCK_PRIORITY 9
IF EXISTS(SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE
					TABLE_NAME= 'EST_NF_ENT' AND COLUMN_NAME = 'RZ_DESTINATARIO'
								AND CHARACTER_MAXIMUM_LENGTH < 100 )
BEGIN
	ALTER TABLE EST_NF_ENT ALTER COLUMN RZ_DESTINATARIO  VARCHAR(100) COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS NULL ;
END
GO

IF EXISTS(SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE
					TABLE_NAME= 'EST_NF_ENT' AND COLUMN_NAME = 'RZ_EMITENTE'
								AND CHARACTER_MAXIMUM_LENGTH < 100 )
BEGIN
	ALTER TABLE EST_NF_ENT ALTER COLUMN RZ_EMITENTE		VARCHAR(100) COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS NULL;
END