【发布时间】:2016-02-09 20:31:31
【问题描述】:
我有程序
create procedure dbo.updateView(@cobdate datetime)
as
begin
Update hir_view set ValidTo=@cobdate where HierarchyId in (
select distinct HierarchyId from hir_organisation where ValidTo<getDate() and HierarchyId not in (
select HierarchyId from hir_organisation where ValidTo>getDate()
)
) and ValidTo>getDate()
end
go
当我尝试调用它时
exec updateView(
convert(
dateTime,'20160209')
);
我收到错误说明 查找错误 - 消息 156,级别 15,状态 34,服务器 DSLNPHX02,第 18 行 - Sybase 数据库错误:关键字“convert”附近的语法不正确。
我不知道我哪里错了
【问题讨论】: