Oracle到SQL Server的迁移

时间:2015-04-27 20:51:05

标签: sql-server oracle

我正致力于从Oracle到SQL Server 2012的服务器迁移。

在存储过程中我有

select 
    @Months = datediff(m, getdate(), cast('12/01/' + CAST(year(getdate()) + 1 as varchar(4)) as datetime))

我是否需要对此查询进行任何更改才能在SQL Server中成功运行?或者它会正常工作?这里使用的函数(在Oracle中)在SQL Server中几乎相同(现在我没有链接服务器来测试)。

1 个答案:

答案 0 :(得分:0)

getdate(),datediff()和Cast()在SQL Server中都是有效的