--主导语句
select string7 from app_k3flow A where oFlowModelID=12046 and string7 is not null
--条件语句
(select ActorID from Ts_ActorMembers where (actortype=10 and ObjectID in(select deptid from Ts_User where UserID=10160) or (actortype=20 and ObjectID=10160)))
--合并后查询结果
select distinct flowid, string7 from app_k3flow A,
(select actorid from Ts_ActorMembers where (actortype=10 and ObjectID in(select deptid from Ts_User where UserID=10160) or (actortype=20 and ObjectID=10160))) temp
where oFlowModelID=12046
and (','+a.string7+',' like '%,'+cast(temp.ActorID as varchar(10)) +',%' or isnull(string7,'') ='')
sql反向查询
最新推荐文章于 2023-03-29 15:09:49 发布