我正在尝试创建一个索引视图。我需要设置dateformat并创建视图。代码如下:
Create view vWMaterializedView
with schemaBInding
as
set dateformat dmy
select
Case
when CAST([Payment Date] AS datetime) BETWEEN CAST('16/07/2017' as datetime) AND CAST('15/07/2018' AS date) then '2074/75'
end as Fiscal_Year ,
from dbo.[Final Payment Bill] FBP