Tables [dbo].[JobCostingItemActualOnly]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created8:56:46 AM Friday, November 22, 2024
Last Modified8:56:46 AM Friday, November 22, 2024
Columns
NameData TypeMax Length (Bytes)Allow Nulls
Cluster Key IX_JobCostingItemActualOnly_OrderFID: OrderFIDForeign Keys FK_JobCostingItemActualOnly_Orders: [dbo].[Orders].OrderFIDOrderFIDint4
No
Datedate3
Yes
Foreign Keys FK_JobCostingItemActualOnly_ExpenseCategory: [dbo].[ExpenseCategory].ExpenseCategoryFIDExpenseCategoryFIDint4
No
ExpenseTypevarchar(128)128
No
Quantitydecimal(12,2)9
Yes
Costdecimal(12,2)9
No
RatedAmountdecimal(12,2)9
Yes
Foreign Keys FK_JobCostingItemActualOnly_LocServ: [dbo].[LocServ].LocServFIDLocServFIDint4
Yes
QuantityPerUnitdecimal(12,2)9
Yes
LaborTotalint4
Yes
RatePerHourdecimal(12,2)9
Yes
Foreign Keys FK_JobCostingItemActualOnly_LaborRatingType: [dbo].[LaborRatingType].LaborRatingTypeFIDLaborRatingTypeFIDint4
Yes
Indexes Indexes
NameColumns
Cluster Key IX_JobCostingItemActualOnly_OrderFID: OrderFIDIX_JobCostingItemActualOnly_OrderFIDOrderFID
Foreign Keys Foreign Keys
NameDeleteColumns
FK_JobCostingItemActualOnly_ExpenseCategoryExpenseCategoryFID->[dbo].[ExpenseCategory].[ExpenseCategoryID]
FK_JobCostingItemActualOnly_LaborRatingTypeLaborRatingTypeFID->[dbo].[LaborRatingType].[LaborRatingTypeID]
FK_JobCostingItemActualOnly_LocServSetNullLocServFID->[dbo].[LocServ].[PriKey]
FK_JobCostingItemActualOnly_OrdersOrderFID->[dbo].[Orders].[PriKey]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[JobCostingItemActualOnly]
(
[OrderFID] [int] NOT NULL,
[Date] [date] NULL,
[ExpenseCategoryFID] [int] NOT NULL,
[ExpenseType] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Quantity] [decimal] (12, 2) NULL,
[Cost] [decimal] (12, 2) NOT NULL,
[RatedAmount] [decimal] (12, 2) NULL,
[LocServFID] [int] NULL,
[QuantityPerUnit] [decimal] (12, 2) NULL,
[LaborTotal] [int] NULL,
[RatePerHour] [decimal] (12, 2) NULL,
[LaborRatingTypeFID] [int] NULL
) ON [PRIMARY]
GO
CREATE CLUSTERED INDEX [IX_JobCostingItemActualOnly_OrderFID] ON [dbo].[JobCostingItemActualOnly] ([OrderFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[JobCostingItemActualOnly] ADD CONSTRAINT [FK_JobCostingItemActualOnly_ExpenseCategory] FOREIGN KEY ([ExpenseCategoryFID]) REFERENCES [dbo].[ExpenseCategory] ([ExpenseCategoryID])
GO
ALTER TABLE [dbo].[JobCostingItemActualOnly] ADD CONSTRAINT [FK_JobCostingItemActualOnly_LaborRatingType] FOREIGN KEY ([LaborRatingTypeFID]) REFERENCES [dbo].[LaborRatingType] ([LaborRatingTypeID])
GO
ALTER TABLE [dbo].[JobCostingItemActualOnly] ADD CONSTRAINT [FK_JobCostingItemActualOnly_LocServ] FOREIGN KEY ([LocServFID]) REFERENCES [dbo].[LocServ] ([PriKey]) ON DELETE SET NULL
GO
ALTER TABLE [dbo].[JobCostingItemActualOnly] ADD CONSTRAINT [FK_JobCostingItemActualOnly_Orders] FOREIGN KEY ([OrderFID]) REFERENCES [dbo].[Orders] ([PriKey])
GO
GRANT SELECT ON  [dbo].[JobCostingItemActualOnly] TO [MssExec]
GRANT INSERT ON  [dbo].[JobCostingItemActualOnly] TO [MssExec]
GRANT DELETE ON  [dbo].[JobCostingItemActualOnly] TO [MssExec]
GRANT UPDATE ON  [dbo].[JobCostingItemActualOnly] TO [MssExec]
GO
Uses