while(@@fetch_status=0)to icevi(按钮工厂):多谢!是单引号问题,已经解决。 另有一问题,要对fetch出来满足条件的当前行进行更新,查了书,说要用where current of子句或是用数据库API SQLSetPos。 这里并非编写外部程序,API就无用了,不知道where current of该如何用于update句子中。begin if @date2>"2002-8-17" ~~~~~~~~~~~~~~~~~~~~~` 这里报错,提示列名'2002-8-17'无效。。 begin update evection set evec_days=datediff("dd",@date1,@date2) endend
已解决! update evection set evec_days=datediff("dd",@date1,@date2) where current of time_judge
另有一问题,要对fetch出来满足条件的当前行进行更新,查了书,说要用where current of子句或是用数据库API SQLSetPos。
这里并非编写外部程序,API就无用了,不知道where current of该如何用于update句子中。begin
if @date2>"2002-8-17"
~~~~~~~~~~~~~~~~~~~~~`
这里报错,提示列名'2002-8-17'无效。。 begin
update evection set evec_days=datediff("dd",@date1,@date2)
endend
update evection set evec_days=datediff("dd",@date1,@date2) where current of time_judge