Tables [dbo].[PMImportDetail]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created1:05:54 PM Monday, January 28, 2013
Last Modified10:27:18 AM Monday, March 30, 2015
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Cluster Primary Key PK_PMImportDetail: PMImportDetailIDPMImportDetailIDint4
No
1 - 1
Foreign Keys FK_PMImportDetail_PMImportHeader: [dbo].[PMImportHeader].PMImportHeaderFIDIndexes IX_PMImportDetail_PMImportHeaderFID: PMImportHeaderFIDPMImportHeaderFIDint4
No
OrderControlvarchar(30)30
Yes
Descriptionvarchar(128)128
Yes
VendorIDvarchar(15)15
Yes
Amountmoney8
Yes
Datedatetime8
Yes
Foreign Keys FK_PMImportDetail_Orders: [dbo].[Orders].OrderFIDOrderFIDint4
Yes
Foreign Keys FK_PMImportDetail_PaymentCode: [dbo].[PaymentCode].PaymentCodeFIDPaymentCodeFIDint4
Yes
SortByvarchar(128)128
Yes
DriverNovarchar(15)15
Yes
MergeablePaymentbit1
No
((1))
CustomerNumbervarchar(15)15
Yes
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_PMImportDetail: PMImportDetailIDPK_PMImportDetailPMImportDetailID
Yes
IX_PMImportDetail_PMImportHeaderFIDPMImportHeaderFID
Foreign Keys Foreign Keys
NameColumns
FK_PMImportDetail_OrdersOrderFID->[dbo].[Orders].[PriKey]
FK_PMImportDetail_PaymentCodePaymentCodeFID->[dbo].[PaymentCode].[PaymentCodePriKey]
FK_PMImportDetail_PMImportHeaderPMImportHeaderFID->[dbo].[PMImportHeader].[PMImportHeaderID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[PMImportDetail]
(
[PMImportDetailID] [int] NOT NULL IDENTITY(1, 1),
[PMImportHeaderFID] [int] NOT NULL,
[OrderControl] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Description] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[VendorID] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Amount] [money] NULL,
[Date] [datetime] NULL,
[OrderFID] [int] NULL,
[PaymentCodeFID] [int] NULL,
[SortBy] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DriverNo] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[MergeablePayment] [bit] NOT NULL CONSTRAINT [DF_PMImportDetail_MergeablePayment] DEFAULT ((1)),
[CustomerNumber] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PMImportDetail] ADD CONSTRAINT [PK_PMImportDetail] PRIMARY KEY CLUSTERED  ([PMImportDetailID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_PMImportDetail_PMImportHeaderFID] ON [dbo].[PMImportDetail] ([PMImportHeaderFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PMImportDetail] ADD CONSTRAINT [FK_PMImportDetail_Orders] FOREIGN KEY ([OrderFID]) REFERENCES [dbo].[Orders] ([PriKey])
GO
ALTER TABLE [dbo].[PMImportDetail] ADD CONSTRAINT [FK_PMImportDetail_PaymentCode] FOREIGN KEY ([PaymentCodeFID]) REFERENCES [dbo].[PaymentCode] ([PaymentCodePriKey])
GO
ALTER TABLE [dbo].[PMImportDetail] ADD CONSTRAINT [FK_PMImportDetail_PMImportHeader] FOREIGN KEY ([PMImportHeaderFID]) REFERENCES [dbo].[PMImportHeader] ([PMImportHeaderID])
GO
GRANT SELECT ON  [dbo].[PMImportDetail] TO [MssExec]
GRANT INSERT ON  [dbo].[PMImportDetail] TO [MssExec]
GRANT DELETE ON  [dbo].[PMImportDetail] TO [MssExec]
GRANT UPDATE ON  [dbo].[PMImportDetail] TO [MssExec]
GO
Uses
Used By