日期:2014-05-16  浏览次数:20551 次

代码世界
select w.IWORKITEMID   as iworkitemid,
                       w.SWORKITEMNO   as sworkitemno,
                       w.IBUID         as ibuid,
                       w.SWORKITEMDESC as sworkitemdesc
                  from T_TLC_WORKITEM w
                 where w.IBUID = '241'
                   and w.ivalid = 0
                   and w.iworkitemid <= 0
                  and exists (select 0
                          from t_tlc_project_wbs_ref wref,
                               t_tlc_wbs_template    wbs
                         where wref.itask_id = wbs.itaskid
                           and wref.iproject_id = '4797'
                           and wbs.iwbstypeid = w.iworkitmetypeid
                           and wbs.istatus = 0