select *from MatrixInfo
select *from MatrixFieldInfo where matrixid ='6'
select FDepartment,FTopManager,*
from Matrixtable_6
where FTopManager =7
------------------
查找矩阵用在哪些流程
select case when charindex('`~`8',typename)>0 then SUBSTRING(typename,7,charindex('`~`8',typename)-7) else typename end,
case when charindex('`~`8',workflowname)>0 then SUBSTRING(workflowname,7,charindex('`~`8',workflowname)-7) else workflowname end,
case when charindex('`~`8',nodename)>0 then SUBSTRING(nodename,7,charindex('`~`8',nodename)-7) else nodename end,mfi.displayname,* from
workflow_flownode wffn
left join workflow_nodebase wfnb on wffn.nodeid=wfnb.id
left join workflow_base wfb on wfb.id=wffn.workflowid
left join workflow_type wft on wft.id=wfb.workflowtype
left join workflow_nodegroup wfng on wfng.nodeid=wffn.nodeid
left join workflow_groupdetail wfgd on wfng.id=wfgd.groupid
left join workflow_groupdetail_matrix wfgdm on wfgdm.groupdetailid=wfgd.id
left join MatrixFieldInfo mfi on mfi.matrixid=wfgdm.matrix and mfi.id=wfgdm.value_field
left join MatrixInfo mi on mfi.matrixid=mi.id
where wfgdm.matrix=29 and value_field=117
and wfb.workflowname not like '%停用%'
and wfb.workflowname not like '%ps%'
select *from MatrixInfo --查找矩阵编号
select *from MatrixFieldInfo where matrixid ='12' --查找具体矩阵对应的编号
如果需要查找其他矩阵只需要修改此处的29、117《where wfgdm.matrix=29 and value_field=117》
29表示的是矩阵的ID,117表示该矩阵中某一列的ID