22 lines
1.5 KiB
Transact-SQL
22 lines
1.5 KiB
Transact-SQL
/*
|
||
Run this script on SQL Server 2008 or later. There may be flaws if running on earlier versions of SQL Server.
|
||
*/
|
||
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[VW_Expenditure2FeeCalculation]') AND type in (N'V'))
|
||
DROP VIEW [dbo].[VW_Expenditure2FeeCalculation]
|
||
GO
|
||
SET QUOTED_IDENTIFIER OFF
|
||
GO
|
||
SET ANSI_NULLS ON
|
||
GO
|
||
CREATE VIEW [dbo].[VW_Expenditure2FeeCalculation]
|
||
AS
|
||
SELECT Fee_Calculation.Id,
|
||
Fee_Calculation.ExpenditureCategoryId,
|
||
Fee_Calculation.MinShot,
|
||
Fee_Calculation.MaxShot,
|
||
Fee_Calculation.Quantity,
|
||
Expenditure_Category.WksSubjectToFee
|
||
FROM Fee_Calculation
|
||
INNER JOIN Expenditure_Category ON Fee_Calculation.ExpenditureCategoryId = Expenditure_Category.Id
|
||
GO
|