Tables [dbo].[ICJournal]
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created12:56:06 AM Thursday, March 21, 2019
Last Modified1:11:33 AM Thursday, March 21, 2019
KeyNameData TypeMax Length (Bytes)Allow NullsDefault
Cluster Primary Key PK_ICJournal: JournalIDJournalIDint4
False
JournalNumbervarchar(15)15
False
Typechar(2)2
False
Datedatetime8
False
DatePeriodint4
False
Periodint4
False
Descriptionvarchar(255)255
False
TransactionTypeIDint4
False
CreatorIDchar(8)8
False
UpdatorIDchar(8)8
False
CreateDatedatetime8
False
(getdate())
LastUpdatedatetime8
False
(getdate())
timestamptimestamp8
True
Foreign Keys FK_ICJournal_NoteID_ICJournalNotes: [dbo].[ICJournalNotes].NoteIDNoteIDint4
True
NoteFlagint4
False
((0))
Foreign Keys FK_ICJournal_WarehouseID_ICWarehouses: [dbo].[ICWarehouses].WarehouseIDWarehouseIDint4
True
Foreign Keys FK_ICJournal_AdjustmentCodeID_ICAdjustmentCodes: [dbo].[ICAdjustmentCodes].AdjustmentCodeIDAdjustmentCodeIDint4
True
NoteCountint4
False
((0))
Foreign Keys FK_ICJournal_AllocatedVoucherID_APVouchers: [dbo].[APVouchers].AllocatedVoucherIDAllocatedVoucherIDint4
True
KeyNameKey ColumnsUniqueFill Factor
Cluster Primary Key PK_ICJournal: JournalIDPK_ICJournalJournalID
True
80
NameColumns
FK_ICJournal_AdjustmentCodeID_ICAdjustmentCodesAdjustmentCodeID->[dbo].[ICAdjustmentCodes].[AdjustmentCodeID]
FK_ICJournal_AllocatedVoucherID_APVouchersAllocatedVoucherID->[dbo].[APVouchers].[VoucherID]
FK_ICJournal_NoteID_ICJournalNotesNoteID->[dbo].[ICJournalNotes].[NoteID]
FK_ICJournal_WarehouseID_ICWarehousesWarehouseID->[dbo].[ICWarehouses].[WarehouseID]
CREATE TABLE [dbo].[ICJournal]
(
[JournalID] [int] NOT NULL,
[JournalNumber] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Type] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Date] [datetime] NOT NULL,
[DatePeriod] [int] NOT NULL,
[Period] [int] NOT NULL,
[Description] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[TransactionTypeID] [int] NOT NULL,
[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_ICJournal_CreateDate] DEFAULT (getdate()),
[LastUpdate] [datetime] NOT NULL CONSTRAINT [DF_ICJournal_LastUpdate] DEFAULT (getdate()),
[timestamp] [timestamp] NULL,
[NoteID] [int] NULL,
[NoteFlag] [int] NOT NULL CONSTRAINT [DF_ICJournal_NoteFlag] DEFAULT ((0)),
[WarehouseID] [int] NULL,
[AdjustmentCodeID] [int] NULL,
[NoteCount] [int] NOT NULL CONSTRAINT [DF_ICJournal_NoteCount] DEFAULT ((0)),
[AllocatedVoucherID] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ICJournal] ADD CONSTRAINT [PK_ICJournal] PRIMARY KEY CLUSTERED  ([JournalID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ICJournal] ADD CONSTRAINT [FK_ICJournal_AdjustmentCodeID_ICAdjustmentCodes] FOREIGN KEY ([AdjustmentCodeID]) REFERENCES [dbo].[ICAdjustmentCodes] ([AdjustmentCodeID])
GO
ALTER TABLE [dbo].[ICJournal] ADD CONSTRAINT [FK_ICJournal_AllocatedVoucherID_APVouchers] FOREIGN KEY ([AllocatedVoucherID]) REFERENCES [dbo].[APVouchers] ([VoucherID])
GO
ALTER TABLE [dbo].[ICJournal] ADD CONSTRAINT [FK_ICJournal_NoteID_ICJournalNotes] FOREIGN KEY ([NoteID]) REFERENCES [dbo].[ICJournalNotes] ([NoteID])
GO
ALTER TABLE [dbo].[ICJournal] ADD CONSTRAINT [FK_ICJournal_WarehouseID_ICWarehouses] FOREIGN KEY ([WarehouseID]) REFERENCES [dbo].[ICWarehouses] ([WarehouseID])
GO