/****** Object:  Table [dbo].[ADM_ERRO]    Script Date: 08/15/2012 09:07:21 ******/
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PDV_CUPOM_NAO_FISCAL_AUDIT_CANCEL]') AND type in (N'U'))
  
 BEGIN
CREATE TABLE [dbo].[PDV_CUPOM_NAO_FISCAL_AUDIT_CANCEL](
	[ID_CD_CTR] [int] IDENTITY(1,1) NOT NULL,
	[CD_EMP] [INT] NOT NULL,
	[CD_FILIAL] [INT] NOT NULL,
	[CD_CTR] [INT] NOT NULL,
	[DT_ALT] [DATETIME] NOT NULL,
	[CD_USU_ALT] [INT] NOT NULL,
	[ST_CUPOM] [INT] NOT NULL,     
	[TP_CUPOM_NAO_FISCAL] [INT] NOT NULL,     
 CONSTRAINT [PK_PDV_CUPOM_NAO_FISCAL_AUDIT_CANCEL] PRIMARY KEY CLUSTERED 
	( [ID_CD_CTR] ASC, [CD_EMP] ASC
	)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
	) ON [PRIMARY]	
	ALTER TABLE [dbo].[PDV_CUPOM_NAO_FISCAL_AUDIT_CANCEL] ADD  CONSTRAINT [DF_PDV_CUPOM_NAO_FISCAL_AUDIT_CANCEL_CD_EMP]  DEFAULT ((0)) FOR [CD_EMP]
	
	ALTER TABLE [dbo].[PDV_CUPOM_NAO_FISCAL_AUDIT_CANCEL] ADD  CONSTRAINT [DF_PDV_CUPOM_NAO_FISCAL_AUDIT_CANCEL_CD_FILIAL]  DEFAULT ((0)) FOR [CD_FILIAL]
	
	ALTER TABLE [dbo].[PDV_CUPOM_NAO_FISCAL_AUDIT_CANCEL] ADD  CONSTRAINT [DF_PDV_CUPOM_NAO_FISCAL_AUDIT_CANCEL_CD_USU_ALT]  DEFAULT ((0)) FOR [CD_USU_ALT]
	
	ALTER TABLE [dbo].[PDV_CUPOM_NAO_FISCAL_AUDIT_CANCEL] ADD  CONSTRAINT [DF_PDV_CUPOM_NAO_FISCAL_AUDIT_CANCEL_DT_ALT]  DEFAULT GETDATE() FOR [DT_ALT]

	
END
