create function M_Student_PracticePlan_AddOrUpdate
(
@content varchar(50),
@stuNum int ,
@programId int,
@programType int,
@Planweek int)
returns int
AS
Begin
if ((select id from StuPraDetailPlan where StuNum = @stuNum and ProgramId = @programId and ProgramIdType=@ProgramType and [Week] = @Planweek) is null)
Begin
insert into StuPraDetailPlan(StuNum,ProgramId,ProgramIdType,[Week],PlanContent)
values (@stuNum,@programId,@ProgramType,@Planweek,@content)
End
else
Begin
update StuPraDetailPlan set PlanContent =''+@content+''
where StuNum=@stuNum and ProgramId=@programId and ProgramIdType =@programType and [week]= @Planweek
End
return 1
End消息 443,级别 16,状态 15,过程 M_Student_PracticePlan_AddOrUpdate,第 15 行
在函数内的 'INSERT' 中对带副作用的或依赖于时间的运算符的使用无效。
消息 443,级别 16,状态 15,过程 M_Student_PracticePlan_AddOrUpdate,第 21 行
在函数内的 'UPDATE' 中对带副作用的或依赖于时间的运算符的使用无效。
(
@content varchar(50),
@stuNum int ,
@programId int,
@programType int,
@Planweek int)
returns int
AS
Begin
if ((select id from StuPraDetailPlan where StuNum = @stuNum and ProgramId = @programId and ProgramIdType=@ProgramType and [Week] = @Planweek) is null)
Begin
insert into StuPraDetailPlan(StuNum,ProgramId,ProgramIdType,[Week],PlanContent)
values (@stuNum,@programId,@ProgramType,@Planweek,@content)
End
else
Begin
update StuPraDetailPlan set PlanContent =''+@content+''
where StuNum=@stuNum and ProgramId=@programId and ProgramIdType =@programType and [week]= @Planweek
End
return 1
End消息 443,级别 16,状态 15,过程 M_Student_PracticePlan_AddOrUpdate,第 15 行
在函数内的 'INSERT' 中对带副作用的或依赖于时间的运算符的使用无效。
消息 443,级别 16,状态 15,过程 M_Student_PracticePlan_AddOrUpdate,第 21 行
在函数内的 'UPDATE' 中对带副作用的或依赖于时间的运算符的使用无效。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货