Tables [dbo].[HtmlLetter]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created7:24:25 AM Friday, December 7, 2018
Last Modified7:24:42 AM Friday, December 7, 2018
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentity
Cluster Primary Key PK_HtmlLetter: HtmlLetterIDHtmlLetterIDint4
No
1 - 1
ReportMenuNamevarchar(425)425
No
Foreign Keys FK_HtmlLetter_ReportSystemLocation: [dbo].[ReportSystemLocation].ReportSystemLocationFIDReportSystemLocationFIDint4
Yes
Foreign Keys FK_HtmlLetter_ReportGroup: [dbo].[ReportGroup].ReportGroupFIDReportGroupFIDint4
Yes
Foreign Keys FK_HtmlLetter_DocumentType: [dbo].[DocumentType].DocumentTypeFIDDocumentTypeFIDint4
No
CreatedOndatetime8
No
CreatedByint4
No
LastEditeddatetime8
Yes
LastEditedByint4
Yes
TimesUsedint4
No
LetterContentnvarchar(max)max
No
MarginLeftfloat8
No
MarginRightfloat8
No
MarginTopfloat8
No
MarginBottomfloat8
No
PageWidthfloat8
No
PageHeightfloat8
No
IsLandscapebit1
No
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_HtmlLetter: HtmlLetterIDPK_HtmlLetterHtmlLetterID
Yes
Foreign Keys Foreign Keys
NameDeleteColumns
FK_HtmlLetter_DocumentTypeDocumentTypeFID->[dbo].[DocumentType].[DocumentTypeID]
FK_HtmlLetter_ReportGroupSetNullReportGroupFID->[dbo].[ReportGroup].[ReportGroupID]
FK_HtmlLetter_ReportSystemLocationReportSystemLocationFID->[dbo].[ReportSystemLocation].[ReportSystemLocationID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[HtmlLetter]
(
[HtmlLetterID] [int] NOT NULL IDENTITY(1, 1),
[ReportMenuName] [varchar] (425) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ReportSystemLocationFID] [int] NULL,
[ReportGroupFID] [int] NULL,
[DocumentTypeFID] [int] NOT NULL,
[CreatedOn] [datetime] NOT NULL,
[CreatedBy] [int] NOT NULL,
[LastEdited] [datetime] NULL,
[LastEditedBy] [int] NULL,
[TimesUsed] [int] NOT NULL,
[LetterContent] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[MarginLeft] [float] NOT NULL,
[MarginRight] [float] NOT NULL,
[MarginTop] [float] NOT NULL,
[MarginBottom] [float] NOT NULL,
[PageWidth] [float] NOT NULL,
[PageHeight] [float] NOT NULL,
[IsLandscape] [bit] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[HtmlLetter] ADD CONSTRAINT [PK_HtmlLetter] PRIMARY KEY CLUSTERED  ([HtmlLetterID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[HtmlLetter] ADD CONSTRAINT [FK_HtmlLetter_DocumentType] FOREIGN KEY ([DocumentTypeFID]) REFERENCES [dbo].[DocumentType] ([DocumentTypeID])
GO
ALTER TABLE [dbo].[HtmlLetter] ADD CONSTRAINT [FK_HtmlLetter_ReportGroup] FOREIGN KEY ([ReportGroupFID]) REFERENCES [dbo].[ReportGroup] ([ReportGroupID]) ON DELETE SET NULL
GO
ALTER TABLE [dbo].[HtmlLetter] ADD CONSTRAINT [FK_HtmlLetter_ReportSystemLocation] FOREIGN KEY ([ReportSystemLocationFID]) REFERENCES [dbo].[ReportSystemLocation] ([ReportSystemLocationID])
GO
GRANT SELECT ON  [dbo].[HtmlLetter] TO [MssExec]
GRANT INSERT ON  [dbo].[HtmlLetter] TO [MssExec]
GRANT DELETE ON  [dbo].[HtmlLetter] TO [MssExec]
GRANT UPDATE ON  [dbo].[HtmlLetter] TO [MssExec]
GO
Uses
Used By