IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='TELE_ORC_ETIQUETA_DANFE_ERRO' and xtype='U')
BEGIN
	CREATE TABLE TELE_ORC_ETIQUETA_DANFE_ERRO(
		[CD_CTR]	[bigint] IDENTITY(1,1) NOT NULL,
		[CD_EMP]	[int] NOT NULL,
		[CD_FILIAL] [int] NOT NULL,
		[CD_ORC]	[int] NOT NULL,
		[CD_TRANSPORTE] [int] NOT NULL,
		[CD_SERVICO]	[int] NOT NULL,
		[MSG_INTERNA]	[varchar](255) NULL,
		[MSG_EXTERNA]	[varchar](max) NULL,
		[DT_ERRO]	[datetime] NOT NULL,
	 CONSTRAINT [PK_TELE_ORC_ETIQUETA_DANFE_ERRO] PRIMARY KEY CLUSTERED 
	([CD_CTR] ASC)) ON [PRIMARY]
END

