(select gsid from duizhaobiao as tmp where exists ( select * from duizhaobiao as tmpA where exists ( select 1 from t_userlogin where charindex(rtrim(tmpA.gsid),@companyname)>0 ) and zyid = tmp.zyid ))上面这段语句出来的记录就是如上面所示的样式,我把需要把得出的记录作成如上面要得到的结果的样式,以便于能够被in 接受
where exists
(
select * from duizhaobiao as tmpA
where exists
(
select 1 from t_userlogin
where
charindex(rtrim(tmpA.gsid),@companyname)>0
) and zyid = tmp.zyid ))上面这段语句出来的记录就是如上面所示的样式,我把需要把得出的记录作成如上面要得到的结果的样式,以便于能够被in 接受