Tables [dbo].[POShipments]
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created12:58:35 AM Thursday, March 21, 2019
Last Modified1:13:29 AM Thursday, March 21, 2019
KeyNameData TypeMax Length (Bytes)Allow NullsIdentityDefault
Cluster Primary Key PK_POShipments: ShipmentIDShipmentIDint4
False
1 - 1
ShipmentNumbervarchar(15)15
False
Foreign Keys FK_POShipments_POID_POOrders: [dbo].[POOrders].POIDPOIDint4
False
BaseTypeIDint4
False
((2))
Datedatetime8
False
DatePeriodint4
False
Periodint4
False
EstDeliveryDatedatetime8
True
DeliveryDatedatetime8
True
Foreign Keys FK_POShipments_VendorID_APVendors: [dbo].[APVendors].VendorIDVendorIDint4
False
Descriptionvarchar(255)255
False
ShipToAttnvarchar(64)64
False
ShipToNamevarchar(128)128
False
ShipToAddressvarchar(64)64
False
ShipToCityvarchar(32)32
False
ShipToStatevarchar(16)16
False
ShipToZipvarchar(16)16
False
ShipToCountryvarchar(16)16
False
Foreign Keys FK_POShipments_ShipMethodID_ShShipMethods: [dbo].[ShShipMethods].ShipMethodIDShipMethodIDint4
True
Foreign Keys FK_POShipments_TransactionTypeID_ShTransactionTypes: [dbo].[ShTransactionTypes].TransactionTypeIDTransactionTypeIDint4
False
Foreign Keys FK_POShipments_BranchID_GLBranches: [dbo].[GLBranches].BranchIDBranchIDint4
False
TrackingNumbersvarchar(2048)2048
False
('')
ShipmentNotesvarchar(255)255
False
('')
FreightCostmoney8
False
((0))
Weightdecimal(18,6)9
False
((0))
Totalmoney8
False
Foreign Keys FK_POShipments_VoidID_POShipments: [dbo].[POShipments].VoidIDVoidIDint4
True
Voidbit1
False
((0))
Reversalbit1
False
((0))
CreatorIDchar(8)8
False
UpdatorIDchar(8)8
False
CreateDatedatetime8
False
(getdate())
LastUpdatedatetime8
False
(getdate())
KeyNameKey ColumnsUniqueFill Factor
Cluster Primary Key PK_POShipments: ShipmentIDPK_POShipmentsShipmentID
True
80
NameColumns
FK_POShipments_BranchID_GLBranchesBranchID->[dbo].[GLBranches].[BranchID]
FK_POShipments_POID_POOrdersPOID->[dbo].[POOrders].[POID]
FK_POShipments_ShipMethodID_ShShipMethodsShipMethodID->[dbo].[ShShipMethods].[ShipMethodID]
FK_POShipments_TransactionTypeID_ShTransactionTypesTransactionTypeID->[dbo].[ShTransactionTypes].[TransactionTypeID]
FK_POShipments_VendorID_APVendorsVendorID->[dbo].[APVendors].[VendorID]
FK_POShipments_VoidID_POShipmentsVoidID->[dbo].[POShipments].[ShipmentID]
CREATE TABLE [dbo].[POShipments]
(
[ShipmentID] [int] NOT NULL IDENTITY(1, 1),
[ShipmentNumber] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[POID] [int] NOT NULL,
[BaseTypeID] [int] NOT NULL CONSTRAINT [DF_POShipments_BaseTypeID] DEFAULT ((2)),
[Date] [datetime] NOT NULL,
[DatePeriod] [int] NOT NULL,
[Period] [int] NOT NULL,
[EstDeliveryDate] [datetime] NULL,
[DeliveryDate] [datetime] NULL,
[VendorID] [int] NOT NULL,
[Description] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ShipToAttn] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ShipToName] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ShipToAddress] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ShipToCity] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ShipToState] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ShipToZip] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ShipToCountry] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ShipMethodID] [int] NULL,
[TransactionTypeID] [int] NOT NULL,
[BranchID] [int] NOT NULL,
[TrackingNumbers] [varchar] (2048) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_POShipments_TrackingNumbers] DEFAULT (''),
[ShipmentNotes] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_POShipments_ShipmentNotes] DEFAULT (''),
[FreightCost] [money] NOT NULL CONSTRAINT [DF_POShipments_FreightCost] DEFAULT ((0)),
[Weight] [decimal] (18, 6) NOT NULL CONSTRAINT [DF_POShipments_Weight] DEFAULT ((0)),
[Total] [money] NOT NULL,
[VoidID] [int] NULL,
[Void] [bit] NOT NULL CONSTRAINT [DF_POShipments_Void] DEFAULT ((0)),
[Reversal] [bit] NOT NULL CONSTRAINT [DF_POShipments_Reversal] DEFAULT ((0)),
[CreatorID] [char] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[UpdatorID] [char] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CreateDate] [datetime] NOT NULL CONSTRAINT [DF_POShipments_CreateDate] DEFAULT (getdate()),
[LastUpdate] [datetime] NOT NULL CONSTRAINT [DF_POShipments_LastUpdate] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[POShipments] ADD CONSTRAINT [PK_POShipments] PRIMARY KEY CLUSTERED  ([ShipmentID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[POShipments] ADD CONSTRAINT [FK_POShipments_BranchID_GLBranches] FOREIGN KEY ([BranchID]) REFERENCES [dbo].[GLBranches] ([BranchID])
GO
ALTER TABLE [dbo].[POShipments] ADD CONSTRAINT [FK_POShipments_POID_POOrders] FOREIGN KEY ([POID]) REFERENCES [dbo].[POOrders] ([POID])
GO
ALTER TABLE [dbo].[POShipments] ADD CONSTRAINT [FK_POShipments_ShipMethodID_ShShipMethods] FOREIGN KEY ([ShipMethodID]) REFERENCES [dbo].[ShShipMethods] ([ShipMethodID])
GO
ALTER TABLE [dbo].[POShipments] ADD CONSTRAINT [FK_POShipments_TransactionTypeID_ShTransactionTypes] FOREIGN KEY ([TransactionTypeID]) REFERENCES [dbo].[ShTransactionTypes] ([TransactionTypeID])
GO
ALTER TABLE [dbo].[POShipments] ADD CONSTRAINT [FK_POShipments_VendorID_APVendors] FOREIGN KEY ([VendorID]) REFERENCES [dbo].[APVendors] ([VendorID])
GO
ALTER TABLE [dbo].[POShipments] ADD CONSTRAINT [FK_POShipments_VoidID_POShipments] FOREIGN KEY ([VoidID]) REFERENCES [dbo].[POShipments] ([ShipmentID])
GO