CREATE TABLE [dbo].[PM00200]
(
[VENDORID] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[VENDNAME] [varchar] (65) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[VNDCHKNM] [varchar] (65) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[VENDSHNM] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[VADDCDPR] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[VADCDPAD] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[VADCDSFR] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[VADCDTRO] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[VNDCLSID] [varchar] (11) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[VNDCNTCT] [varchar] (61) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ADDRESS1] [varchar] (61) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ADDRESS2] [varchar] (61) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ADDRESS3] [varchar] (61) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CITY] [varchar] (35) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[STATE] [varchar] (29) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ZIPCODE] [varchar] (11) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[COUNTRY] [varchar] (61) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PHNUMBR1] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PHNUMBR2] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PHONE3] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[FAXNUMBR] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[UPSZONE] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[SHIPMTHD] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[TAXSCHID] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ACNMVNDR] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[TXIDNMBR] [varchar] (11) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[VENDSTTS] [smallint] NOT NULL,
[CURNCYID] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[TXRGNNUM] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PARVENID] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[TRDDISCT] [smallint] NOT NULL,
[TEN99TYPE] [smallint] NOT NULL,
[MINORDER] [numeric] (19, 5) NOT NULL,
[PYMTRMID] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[MINPYTYP] [smallint] NOT NULL,
[MINPYPCT] [smallint] NOT NULL,
[MINPYDLR] [numeric] (19, 5) NOT NULL,
[MXIAFVND] [smallint] NOT NULL,
[MAXINDLR] [numeric] (19, 5) NOT NULL,
[COMMENT1] [varchar] (31) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[COMMENT2] [varchar] (31) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[USERDEF1] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[USERDEF2] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CRLMTDLR] [numeric] (19, 5) NOT NULL,
[PYMNTPRI] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[KPCALHST] [tinyint] NOT NULL,
[KGLDSTHS] [tinyint] NOT NULL,
[KPERHIST] [tinyint] NOT NULL,
[KPTRXHST] [tinyint] NOT NULL,
[HOLD] [tinyint] NOT NULL,
[PTCSHACF] [smallint] NOT NULL,
[CREDTLMT] [smallint] NOT NULL,
[WRITEOFF] [smallint] NOT NULL,
[MXWOFAMT] [numeric] (19, 5) NOT NULL,
[SBPPSDED] [tinyint] NOT NULL,
[PPSTAXRT] [smallint] NOT NULL,
[DXVARNUM] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CRTCOMDT] [datetime] NOT NULL,
[CRTEXPDT] [datetime] NOT NULL,
[RTOBUTKN] [tinyint] NOT NULL,
[XPDTOBLG] [tinyint] NOT NULL,
[PRSPAYEE] [tinyint] NOT NULL,
[PMAPINDX] [int] NOT NULL,
[PMCSHIDX] [int] NOT NULL,
[PMDAVIDX] [int] NOT NULL,
[PMDTKIDX] [int] NOT NULL,
[PMFINIDX] [int] NOT NULL,
[PMMSCHIX] [int] NOT NULL,
[PMFRTIDX] [int] NOT NULL,
[PMTAXIDX] [int] NOT NULL,
[PMWRTIDX] [int] NOT NULL,
[PMPRCHIX] [int] NOT NULL,
[PMRTNGIX] [int] NOT NULL,
[PMTDSCIX] [int] NOT NULL,
[ACPURIDX] [int] NOT NULL,
[PURPVIDX] [int] NOT NULL,
[NOTEINDX] [numeric] (19, 5) NOT NULL,
[CHEKBKID] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[MODIFDT] [datetime] NOT NULL,
[CREATDDT] [datetime] NOT NULL,
[RATETPID] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Revalue_Vendor] [tinyint] NOT NULL,
[Post_Results_To] [smallint] NOT NULL,
[FREEONBOARD] [smallint] NOT NULL,
[GOVCRPID] [varchar] (31) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[GOVINDID] [varchar] (31) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DISGRPER] [smallint] NOT NULL,
[DUEGRPER] [smallint] NOT NULL,
[DOCFMTID] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[TaxInvRecvd] [tinyint] NOT NULL,
[DEX_ROW_ID] [int] NOT NULL IDENTITY(1, 1)
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PM00200] ADD CONSTRAINT [CK_PM00200_CREATDDT] CHECK ((datepart(hour,[CREATDDT])=(0) AND datepart(minute,[CREATDDT])=(0) AND datepart(second,[CREATDDT])=(0) AND datepart(millisecond,[CREATDDT])=(0)))
GO
ALTER TABLE [dbo].[PM00200] ADD CONSTRAINT [CK_PM00200_CRTCOMDT] CHECK ((datepart(hour,[CRTCOMDT])=(0) AND datepart(minute,[CRTCOMDT])=(0) AND datepart(second,[CRTCOMDT])=(0) AND datepart(millisecond,[CRTCOMDT])=(0)))
GO
ALTER TABLE [dbo].[PM00200] ADD CONSTRAINT [CK_PM00200_CRTEXPDT] CHECK ((datepart(hour,[CRTEXPDT])=(0) AND datepart(minute,[CRTEXPDT])=(0) AND datepart(second,[CRTEXPDT])=(0) AND datepart(millisecond,[CRTEXPDT])=(0)))
GO
ALTER TABLE [dbo].[PM00200] ADD CONSTRAINT [CK_PM00200_MODIFDT] CHECK ((datepart(hour,[MODIFDT])=(0) AND datepart(minute,[MODIFDT])=(0) AND datepart(second,[MODIFDT])=(0) AND datepart(millisecond,[MODIFDT])=(0)))
GO
ALTER TABLE [dbo].[PM00200] ADD CONSTRAINT [PK_PM00200] PRIMARY KEY CLUSTERED ([VENDORID]) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_PM00200_VENDNAME_VENDORID] ON [dbo].[PM00200] ([VENDNAME], [VENDORID]) ON [PRIMARY]
GO
GRANT SELECT ON [dbo].[PM00200] TO [MssExec]
GRANT INSERT ON [dbo].[PM00200] TO [MssExec]
GRANT DELETE ON [dbo].[PM00200] TO [MssExec]
GRANT UPDATE ON [dbo].[PM00200] TO [MssExec]
GO