CREATE TABLE [dbo].[RM00101]
(
[CUSTNMBR] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CUSTNAME] [varchar] (65) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CUSTCLAS] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CPRCSTNM] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CNTCPRSN] [varchar] (61) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[STMTNAME] [varchar] (65) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[SHRTNAME] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ADRSCODE] [varchar] (15) 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,
[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,
[COUNTRY] [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,
[ZIP] [varchar] (11) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PHONE1] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PHONE2] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PHONE3] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[FAX] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PRBTADCD] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PRSTADCD] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[STADDRCD] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[SLPRSNID] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CHEKBKID] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PYMTRMID] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CRLMTTYP] [smallint] NOT NULL,
[CRLMTAMT] [numeric] (19, 5) NOT NULL,
[CRLMTPER] [smallint] NOT NULL,
[CRLMTPAM] [numeric] (19, 5) NOT NULL,
[CURNCYID] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[RATETPID] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CUSTDISC] [smallint] NOT NULL,
[PRCLEVEL] [varchar] (11) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[MINPYTYP] [smallint] NOT NULL,
[MINPYDLR] [numeric] (19, 5) NOT NULL,
[MINPYPCT] [smallint] NOT NULL,
[FNCHATYP] [smallint] NOT NULL,
[FNCHPCNT] [smallint] NOT NULL,
[FINCHDLR] [numeric] (19, 5) NOT NULL,
[MXWOFTYP] [smallint] NOT NULL,
[MXWROFAM] [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,
[TAXEXMT1] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[TAXEXMT2] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[TXRGNNUM] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BALNCTYP] [smallint] NOT NULL,
[STMTCYCL] [smallint] NOT NULL,
[BANKNAME] [varchar] (31) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BNKBRNCH] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[SALSTERR] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DEFCACTY] [smallint] NOT NULL,
[RMCSHACC] [int] NOT NULL,
[RMARACC] [int] NOT NULL,
[RMSLSACC] [int] NOT NULL,
[RMIVACC] [int] NOT NULL,
[RMCOSACC] [int] NOT NULL,
[RMTAKACC] [int] NOT NULL,
[RMAVACC] [int] NOT NULL,
[RMFCGACC] [int] NOT NULL,
[RMWRACC] [int] NOT NULL,
[FRSTINDT] [datetime] NOT NULL,
[INACTIVE] [tinyint] NOT NULL,
[HOLD] [tinyint] NOT NULL,
[CRCARDID] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CRCRDNUM] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CCRDXPDT] [datetime] NOT NULL,
[KPDSTHST] [tinyint] NOT NULL,
[KPCALHST] [tinyint] NOT NULL,
[KPERHIST] [tinyint] NOT NULL,
[KPTRXHST] [tinyint] NOT NULL,
[NOTEINDX] [numeric] (19, 5) NOT NULL,
[CREATDDT] [datetime] NOT NULL,
[MODIFDT] [datetime] NOT NULL,
[Revalue_Customer] [tinyint] NOT NULL,
[Post_Results_To] [smallint] NOT NULL,
[FINCHID] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS 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,
[DEX_ROW_ID] [int] NOT NULL IDENTITY(1, 1)
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[RM00101] ADD CONSTRAINT [CK_RM00101_CCRDXPDT] CHECK ((datepart(hour,[CCRDXPDT])=(0) AND datepart(minute,[CCRDXPDT])=(0) AND datepart(second,[CCRDXPDT])=(0) AND datepart(millisecond,[CCRDXPDT])=(0)))
GO
ALTER TABLE [dbo].[RM00101] ADD CONSTRAINT [CK_RM00101_CPRCSTNM_BALNCTYP] CHECK (([CPRCSTNM]<>'' AND [BALNCTYP]=(0) OR [CPRCSTNM]='' AND [BALNCTYP]=(1) OR [CPRCSTNM]='' AND [BALNCTYP]=(0)))
GO
ALTER TABLE [dbo].[RM00101] ADD CONSTRAINT [CK_RM00101_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].[RM00101] ADD CONSTRAINT [CK_RM00101_FRSTINDT] CHECK ((datepart(hour,[FRSTINDT])=(0) AND datepart(minute,[FRSTINDT])=(0) AND datepart(second,[FRSTINDT])=(0) AND datepart(millisecond,[FRSTINDT])=(0)))
GO
ALTER TABLE [dbo].[RM00101] ADD CONSTRAINT [CK_RM00101_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].[RM00101] ADD CONSTRAINT [PK_RM00101] PRIMARY KEY CLUSTERED ([CUSTNMBR]) ON [PRIMARY]
GO
GRANT SELECT ON [dbo].[RM00101] TO [MssExec]
GRANT INSERT ON [dbo].[RM00101] TO [MssExec]
GRANT DELETE ON [dbo].[RM00101] TO [MssExec]
GRANT UPDATE ON [dbo].[RM00101] TO [MssExec]
GO