Tables [dbo].[GPWarehouse]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)22999
Created7:07:56 PM Thursday, December 17, 2009
Last Modified9:08:36 AM Thursday, May 23, 2024
Columns
NameData TypeMax Length (Bytes)Allow NullsDefault
Primary Key PK_GPWarehouse: CustomerNumber\DocumentType\DocumentNumberCluster Key IX_GPWarehouse_CustomerNumber: CustomerNumberCustomerNumbervarchar(15)15
No
Indexes IX_GPWarehouse_OrderID: OrderIDOrderIDint4
Yes
Authorityvarchar(30)30
Yes
Indexes IX_GPWarehouse_OrderNumber: OrderNumberOrderNumbervarchar(23)23
Yes
Salespersonvarchar(44)44
Yes
Shippervarchar(44)44
Yes
OrderOriginAddressvarchar(30)30
Yes
OrderDestinationAddressvarchar(30)30
Yes
BranchIDvarchar(5)5
Yes
InvoiceNumbervarchar(64)64
Yes
InvoiceDatedatetime8
Yes
InvoiceAmountmoney8
Yes
InvoiceAgeint4
Yes
InvoiceCreatedDatedatetime8
Yes
InvoiceCreatedByvarchar(44)44
Yes
InvoicedHeaderIDint4
Yes
Primary Key PK_GPWarehouse: CustomerNumber\DocumentType\DocumentNumberDocumentNumbervarchar(21)21
No
DocumentDescriptionvarchar(128)128
Yes
DocumentDatedatetime8
Yes
DueDatedatetime8
Yes
PostDatedatetime8
Yes
JournalDatedatetime8
Yes
Primary Key PK_GPWarehouse: CustomerNumber\DocumentType\DocumentNumberDocumentTypesmallint2
No
OriginalTransactionAmountmoney8
Yes
CurrentTransactionAmountmoney8
Yes
DocumentAgeint4
Yes
ItemCodeint4
Yes
BranchFIDint4
Yes
PONumbervarchar(30)30
Yes
GBLNumbervarchar(21)21
Yes
IsFactoredbit1
No
((0))
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_GPWarehouse: CustomerNumber\DocumentType\DocumentNumberPK_GPWarehouseCustomerNumber, DocumentType, DocumentNumber
Yes
Cluster Key IX_GPWarehouse_CustomerNumber: CustomerNumberIX_GPWarehouse_CustomerNumberCustomerNumber80
IX_GPWarehouse_OrderIDOrderID80
IX_GPWarehouse_OrderNumberOrderNumber
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[GPWarehouse]
(
[CustomerNumber] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[OrderID] [int] NULL,
[Authority] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[OrderNumber] [varchar] (23) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Salesperson] [varchar] (44) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Shipper] [varchar] (44) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[OrderOriginAddress] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[OrderDestinationAddress] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BranchID] [varchar] (5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[InvoiceNumber] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[InvoiceDate] [datetime] NULL,
[InvoiceAmount] [money] NULL,
[InvoiceAge] [int] NULL,
[InvoiceCreatedDate] [datetime] NULL,
[InvoiceCreatedBy] [varchar] (44) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[InvoicedHeaderID] [int] NULL,
[DocumentNumber] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[DocumentDescription] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DocumentDate] [datetime] NULL,
[DueDate] [datetime] NULL,
[PostDate] [datetime] NULL,
[JournalDate] [datetime] NULL,
[DocumentType] [smallint] NOT NULL,
[OriginalTransactionAmount] [money] NULL,
[CurrentTransactionAmount] [money] NULL,
[DocumentAge] [int] NULL,
[ItemCode] [int] NULL,
[BranchFID] [int] NULL,
[PONumber] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[GBLNumber] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[IsFactored] [bit] NOT NULL CONSTRAINT [DF_GPWarehouse_IsFactored] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[GPWarehouse] ADD CONSTRAINT [PK_GPWarehouse] PRIMARY KEY NONCLUSTERED  ([CustomerNumber], [DocumentType], [DocumentNumber]) ON [PRIMARY]
GO
CREATE CLUSTERED INDEX [IX_GPWarehouse_CustomerNumber] ON [dbo].[GPWarehouse] ([CustomerNumber]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_GPWarehouse_OrderID] ON [dbo].[GPWarehouse] ([OrderID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_GPWarehouse_OrderNumber] ON [dbo].[GPWarehouse] ([OrderNumber]) ON [PRIMARY]
GO
GRANT SELECT ON  [dbo].[GPWarehouse] TO [MssExec]
GRANT INSERT ON  [dbo].[GPWarehouse] TO [MssExec]
GRANT DELETE ON  [dbo].[GPWarehouse] TO [MssExec]
GRANT UPDATE ON  [dbo].[GPWarehouse] TO [MssExec]
GO
Uses
Used By