加了会语法错误的,
你这样看这条语句 就会感觉 没错的
select @tsql=N'update TableNumble set ziduan=' ''+@maxNo+'' ' where flag=' ''+@biaoshi+''
你这样看这条语句 就会感觉 没错的
select @tsql=N'update TableNumble set ziduan=' ''+@maxNo+'' ' where flag=' ''+@biaoshi+''
select @tsql=N'update set ziduan='+@maxNo+' where flag='+@biaoshi+''20行这句写的有问题!
应该改成 where flag='''+@biaoshi+''''
后面四个单引号
select @tsql=N'update TableNumble set ziduan='''+@maxNo+''' where flag='''+@biaoshi+''‘’