在关键字' set'附近创建索引视图,错误语法时

时间:2017-12-24 09:31:32

标签: sql sql-server

我正在尝试创建一个索引视图。我需要设置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

0 个答案:

没有答案