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

解决方案 »

  1.   

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

  2.   

    ;with Args 

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

  3.   

    修正一下
    ;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 
    )
      

  4.   

    这个语句在SQL在执行吗?能不能解释一下?多谢