Tables [dbo].[XmlItemCode]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)29
Created4:57:10 PM Thursday, September 7, 2006
Last Modified11:13:44 AM Monday, August 19, 2013
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDefaultDescription
Cluster Primary Key PK_XmlItemCode: XmlItemCodeIDXmlItemCodeIDint4
No
1 - 1The primary key.
Foreign Keys FK_XmlItemCode_XmlInterface: [dbo].[XmlInterface].XmlInterfaceFIDIndexes IX_Unique_XmlItemCode_XmlInterface: XmlItemCode\XmlInterfaceFIDXmlInterfaceFIDint4
No
Foreign key to an xml interface.
Indexes IX_Unique_XmlItemCode_XmlInterface: XmlItemCode\XmlInterfaceFIDXmlItemCodevarchar(50)50
No
Item code for the xml interface.
TransportationFlagbit1
No
((0))Indicates if the item is transportation. 0 for no, 1 for yes.
Foreign Keys FK_XmlItemCode_ItemCode: [dbo].[ItemCode].ItemCodeFIDItemCodeFIDint4
Yes
Foreign Keys FK_XmlItemCode_MaterialType: [dbo].[MaterialType].MaterialTypeFIDMaterialTypeFIDint4
Yes
Indexes Indexes
NameColumnsUniqueFill Factor
Cluster Primary Key PK_XmlItemCode: XmlItemCodeIDPK_XmlItemCodeXmlItemCodeID
Yes
80
IX_Unique_XmlItemCode_XmlInterfaceXmlItemCode, XmlInterfaceFID
Yes
80
Check Constraints Check Constraints
NameConstraint
CK_XmlItemCode_ItemCode_MaterialType([ItemCodeFID] IS NOT NULL AND [MaterialTypeFID] IS NULL OR [ItemCodeFID] IS NULL AND [MaterialTypeFID] IS NOT NULL)
Foreign Keys Foreign Keys
NameColumns
FK_XmlItemCode_ItemCodeItemCodeFID->[dbo].[ItemCode].[ICPriKey]
FK_XmlItemCode_MaterialTypeMaterialTypeFID->[dbo].[MaterialType].[MaterialTypeID]
FK_XmlItemCode_XmlInterfaceXmlInterfaceFID->[dbo].[XmlInterface].[XmlInterfaceID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[XmlItemCode]
(
[XmlItemCodeID] [int] NOT NULL IDENTITY(1, 1),
[XmlInterfaceFID] [int] NOT NULL,
[XmlItemCode] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[TransportationFlag] [bit] NOT NULL CONSTRAINT [DF_XmlItemCode_TransportationFlag] DEFAULT ((0)),
[ItemCodeFID] [int] NULL,
[MaterialTypeFID] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlItemCode] ADD CONSTRAINT [CK_XmlItemCode_ItemCode_MaterialType] CHECK (([ItemCodeFID] IS NOT NULL AND [MaterialTypeFID] IS NULL OR [ItemCodeFID] IS NULL AND [MaterialTypeFID] IS NOT NULL))
GO
ALTER TABLE [dbo].[XmlItemCode] ADD CONSTRAINT [PK_XmlItemCode] PRIMARY KEY CLUSTERED  ([XmlItemCodeID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlItemCode] ADD CONSTRAINT [IX_Unique_XmlItemCode_XmlInterface] UNIQUE NONCLUSTERED  ([XmlItemCode], [XmlInterfaceFID]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
ALTER TABLE [dbo].[XmlItemCode] ADD CONSTRAINT [FK_XmlItemCode_ItemCode] FOREIGN KEY ([ItemCodeFID]) REFERENCES [dbo].[ItemCode] ([ICPriKey])
GO
ALTER TABLE [dbo].[XmlItemCode] ADD CONSTRAINT [FK_XmlItemCode_MaterialType] FOREIGN KEY ([MaterialTypeFID]) REFERENCES [dbo].[MaterialType] ([MaterialTypeID])
GO
ALTER TABLE [dbo].[XmlItemCode] ADD CONSTRAINT [FK_XmlItemCode_XmlInterface] FOREIGN KEY ([XmlInterfaceFID]) REFERENCES [dbo].[XmlInterface] ([XmlInterfaceID])
GO
GRANT SELECT ON  [dbo].[XmlItemCode] TO [MssExec]
GRANT INSERT ON  [dbo].[XmlItemCode] TO [MssExec]
GRANT DELETE ON  [dbo].[XmlItemCode] TO [MssExec]
GRANT UPDATE ON  [dbo].[XmlItemCode] TO [MssExec]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Indicates if the item is transportation. 0 for no, 1 for yes.', 'SCHEMA', N'dbo', 'TABLE', N'XmlItemCode', 'COLUMN', N'TransportationFlag'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key to an xml interface.', 'SCHEMA', N'dbo', 'TABLE', N'XmlItemCode', 'COLUMN', N'XmlInterfaceFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Item code for the xml interface.', 'SCHEMA', N'dbo', 'TABLE', N'XmlItemCode', 'COLUMN', N'XmlItemCode'
GO
EXEC sp_addextendedproperty N'MS_Description', N'The primary key.', 'SCHEMA', N'dbo', 'TABLE', N'XmlItemCode', 'COLUMN', N'XmlItemCodeID'
GO
Uses
Used By