;with Args
(
select *from GsoM where mk_no=S001' and isnull(idno,'')=''
union all
select *from GsoM ,Args where args.idno = GsoM .mk_no
)
(
select *from GsoM where mk_no=S001' and isnull(idno,'')=''
union all
select *from GsoM ,Args where args.idno = GsoM .mk_no
)
(
select *from GsoM where mk_no='S001' and isnull(idno,'')=''
union all
select *from GsoM ,Args where args.idno = GsoM .mk_no
)
(
select *from GsoM where mk_no=‘S001' and isnull(idno,'')=''
union all
select *from GsoM ,Args where args.idno = GsoM .mk_no
)
;with Args
(
select *from GsoM where mk_no=‘S001' and isnull(idno,'')=''
union all
select GsoM.* from GsoM ,Args where args.idno = GsoM .mk_no
)