打印本文 打印本文 关闭窗口 关闭窗口
SQL 以日期动态更新维护的数据,一周排程时间日期设计
作者:武汉SEO闵涛  文章来源:敏韬网  点击数27288  更新时间:2007/11/14 12:58:28  文章录入:mintao  责任编辑:mintao
and t1.Layer=t2.Layer                  

and t2.IsInSC <> 1                  

 and t1.Qnty>0

and  t1.ProcCode not in(''''990'''',''''000'''')

and t1.Partnum = t3.Partnum

and t1.Revision  = t3.Revision

--and t1.Layer = t3.Layer

and t2.PoNum*=t4.PoNum                                                                            

and t2.Poitem *=t4.SerialNum  

and t1.ProcCode = t6.ProcCode

and t5.Id = t6.Id

and (( t1.PartNum >= @InBPartnum or @InBPartnum='''''''')

           and (t1.PartNum <= @InEPartnum or @InEPartnum=''''''''))

and ((t1.Revision = @InBRevision or @InBRevision ='''''''')

          and (t1.Revision = @InERevision or @InERevision =''''''''))

Group By  t1.Partnum, t1.Revision,

 t3.LPiece , t3.LLPiece , t5.Id ,t5.name

Order By t5.Id , t1.partnum

 

/*wip完整性生成*/

Declare  @CheckPartNum varchar(20) , @CheckRevision varchar(5)

Declare   @WipProcCode varchar(20) , @WipId varchar(5)

 

Select Top 1  @CheckPartNum= Partnum ,  @CheckRevision = Revision From  #tmpStknwip

 

 DECLARE CheckWip INSENSITIVE CURSOR                                                                            

    FOR                      

          Select  ProcName = RTrim(LTrim(t1.Name)) , Id = RTrim(LTrim(t1.Id))

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ...  下一页 >> 

打印本文 打印本文 关闭窗口 关闭窗口