湖北昊腾科技

标题: 中途退学业务流程业务编辑器增加退学学员名称摘要代码 [打印本页]

作者: haotengtech    时间: 2016-5-4 09:04
标题: 中途退学业务流程业务编辑器增加退学学员名称摘要代码
  1. declare @RecordCount int
  2. declare @ExamDate datetime
  3. declare @mark varchar(50)
  4. set @mark='[ '
  5. select top 3 @mark=@mark+rtrim(doc_view.姓名)+' ' from doc_view where 单号=@docnum
  6. set @mark=@mark+']等'
  7. select top 1 @RecordCount=人数,@ExamDate=创建日期 from doc_ywmark where doc_ywmark.单号=@docnum
  8. set @mark=@mark+'['+rtrim(cast(@recordCount as char(20)))+']人中途退学了'

  9. if @cmdtype=1
  10.   begin
  11.      update  doc_ywmark set 状态=1,摘要=case when isnull(摘要,'1')='1' or 摘要='' then @mark else 摘要 end where doc_ywmark.单号=@docnum   
  12.   end
  13. else
  14.   begin
  15.      update  doc_ywmark set 状态=0 where doc_ywmark.单号<a href="mailto:=@docnum">=@docnum
复制代码







欢迎光临 湖北昊腾科技 (http://www.haotengtech.com/) Powered by Discuz! X3.3