字符串ID转换成字符串名字

select  U.CnName+','  from f_splitstr('1828,1055333,1,1035681,752,494,22549,219,23860,478,23453,677,718,782,2358', ',')
     join T_BD_User U on U.ID=F1
  for xML PATH('')

select RoleName,ExecutorName,
  case  when temp.CnName='' then ''
  when temp.CnName<>'' then
  LEFT(temp.CnName,LEN(temp.CnName)-1) end as CnName,ExecuteDate,ActionName,Status,Remark from ( select R.name RoleName,U.CnName ExecutorName,
   (select  U.CnName+','  from f_splitstr(ReceiverID, ',')
     join T_BD_User U on U.ID=F1
  for xML PATH('')) as CnName,
    A.ExecuteDate,
   case ActionID when 13 then '呈递'
   when 38 then '审批'  end ActionName,
    case ApproveLogStatusID when 1 then '已呈递'
   when 2 then '已发布'  end Status,
   Remark
   from
   T_FI_WF_ApproveLog A
      join T_IS_FacilityLPPTemplate LPP on LPP.WorkFlowInstanceID=A.InstanceID
   join T_BD_role R on R.ID=A.roleID
    join T_BD_User U on U.ID=A.ExecutorID
  join T_SYS_Enum_TemplateStatus T on T.ID=A.ApproveLogStatusID
   where LPP.ID=61) temp

上一篇:error LNK1169 找到一个或多个多重定义的符号的解决方法


下一篇:(PMP)解题技巧和典型题目分析(模拟一)