请大家给看一下
ITFWJ 2005-12-10 04:06:21 基础差,帮一下忙解释下面的流程。要学好SQL能做到在其他软件提供的二次开发中取出自己的报表,学什么类的资料最好,最快。
if IsNULL(@strInvCCode1,'')<>'' and IsNULL(@strInvCCode2,'')<>''
Begin
If @strInvCCode1 <= @strInvCCode2
Begin
Set @sExtInvFilter = ' And (LEFT(Inventoryclass.cInVCCode,Len(' + @strInvCCode1 + ')) Between '''
+ @strInvCCode1 +''' and ''' + @strInvCCode2 +''')'
--Select @sExtInvFilter --Debug
End
Else If @strInvCCode1 > @strInvCCode2
Begin
Set @sExtInvFilter = ' And (LEFT(Inventoryclass.cInVCCode,Len(' + @strInvCCode1 + ')) Between '''
+ @strInvCCode2 +''' and ''' + @strInvCCode1 +''')'
--Select @sExtInvFilter --Debug
End
End
else if IsNULL(@strInvCCode1,'')<>'' and IsNULL(@strInvCCode2,'')=''
Set @sExtInvFilter =' And (InventoryClass.cInvCCode Like ''' +@strInvCCode1 +'%'')'
else if IsNULL(@strInvCCode1,'')='' and IsNULL(@strInvCCode2,'')<>''
Set @sExtInvFilter =' And (InventoryClass.cInvCCode Like ''' +@strInvCCode2 +'%'')'