Tables [dbo].[XLedgerItemCodeMap]
Properties
PropertyValue
Row Count (~)0
Created3:25:04 PM Friday, June 6, 2025
Last Modified3:25:04 PM Friday, June 6, 2025
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_XLedgerItemCodeMap: XLedgerItemCodeMapIdXLedgerItemCodeMapIdint4
No
1 - 1
Foreign Keys FK_XLedgerItemCodeMap_ItemCode: [dbo].[ItemCode].ItemCodeFidIndexes IX_XLedgerItemCodeMap_ItemCode_XLedgerItemCodeMapAccountType: ItemCodeFid\XLedgerItemCodeMapAccountTypeFidItemCodeFidint4
No
Foreign Keys FK_XLedgerItemCodeMap_AccountingAccount: [dbo].[AccountingAccount].AccountingAccountFidIndexes IX_XLedgerItemCodeMap_AccountingAccountFid: AccountingAccountFidAccountingAccountFidint4
No
Foreign Keys FK_XLedgerItemCodeMap_XLedgerItemCodeMapAccountType: [dbo].[XLedgerItemCodeMapAccountType].XLedgerItemCodeMapAccountTypeFidIndexes IX_XLedgerItemCodeMap_ItemCode_XLedgerItemCodeMapAccountType: ItemCodeFid\XLedgerItemCodeMapAccountTypeFidXLedgerItemCodeMapAccountTypeFidint4
No
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_XLedgerItemCodeMap: XLedgerItemCodeMapIdPK_XLedgerItemCodeMapXLedgerItemCodeMapId
Yes
IX_XLedgerItemCodeMap_ItemCode_XLedgerItemCodeMapAccountTypeItemCodeFid, XLedgerItemCodeMapAccountTypeFid
Yes
IX_XLedgerItemCodeMap_AccountingAccountFidAccountingAccountFid
Foreign Keys Foreign Keys
NameColumns
FK_XLedgerItemCodeMap_AccountingAccountAccountingAccountFid->[dbo].[AccountingAccount].[AccountingAccountId]
FK_XLedgerItemCodeMap_ItemCodeItemCodeFid->[dbo].[ItemCode].[ICPriKey]
FK_XLedgerItemCodeMap_XLedgerItemCodeMapAccountTypeXLedgerItemCodeMapAccountTypeFid->[dbo].[XLedgerItemCodeMapAccountType].[XLedgerItemCodeMapAccountTypeId]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[XLedgerItemCodeMap]
(
[XLedgerItemCodeMapId] [int] NOT NULL IDENTITY(1, 1),
[ItemCodeFid] [int] NOT NULL,
[AccountingAccountFid] [int] NOT NULL,
[XLedgerItemCodeMapAccountTypeFid] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XLedgerItemCodeMap] ADD CONSTRAINT [PK_XLedgerItemCodeMap] PRIMARY KEY CLUSTERED  ([XLedgerItemCodeMapId]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XLedgerItemCodeMap] ADD CONSTRAINT [IX_XLedgerItemCodeMap_ItemCode_XLedgerItemCodeMapAccountType] UNIQUE NONCLUSTERED  ([ItemCodeFid], [XLedgerItemCodeMapAccountTypeFid]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_XLedgerItemCodeMap_AccountingAccountFid] ON [dbo].[XLedgerItemCodeMap] ([AccountingAccountFid]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XLedgerItemCodeMap] ADD CONSTRAINT [FK_XLedgerItemCodeMap_AccountingAccount] FOREIGN KEY ([AccountingAccountFid]) REFERENCES [dbo].[AccountingAccount] ([AccountingAccountId])
GO
ALTER TABLE [dbo].[XLedgerItemCodeMap] ADD CONSTRAINT [FK_XLedgerItemCodeMap_ItemCode] FOREIGN KEY ([ItemCodeFid]) REFERENCES [dbo].[ItemCode] ([ICPriKey])
GO
ALTER TABLE [dbo].[XLedgerItemCodeMap] ADD CONSTRAINT [FK_XLedgerItemCodeMap_XLedgerItemCodeMapAccountType] FOREIGN KEY ([XLedgerItemCodeMapAccountTypeFid]) REFERENCES [dbo].[XLedgerItemCodeMapAccountType] ([XLedgerItemCodeMapAccountTypeId])
GO
GRANT SELECT ON  [dbo].[XLedgerItemCodeMap] TO [MssExec]
GRANT INSERT ON  [dbo].[XLedgerItemCodeMap] TO [MssExec]
GRANT DELETE ON  [dbo].[XLedgerItemCodeMap] TO [MssExec]
GRANT UPDATE ON  [dbo].[XLedgerItemCodeMap] TO [MssExec]
GO
Uses