日期:2014-05-16 浏览次数:20658 次
CREATE PROCEDURE Cx_indexJl
@TxTs int,@Bm nVarchar(20)
WITH ENCRYPTION
AS
Declare @Date Datetime,@cou1 int,@cou2 int
Set @Date=Convert(Varchar(10),GetDate(),120)
select @Cou1=Count(*) from CkInfo a inner join Login b on a.Lrczy=b.CzyName where b.czyBm=@Bm and ShenHe=1 and
day(@Date)<>LastJxDate and YeMoney>0 and
(BeginDate+4<GetDate() and day(BeginDate)=day(@Date))
select @Cou2=Count(A.id) from DkInfo a,hkjhMan b inner join Login c on a.Lrczy=c.CzyName Where c.czyBm=@Bm and
a.pzh=b.h_dh and a.YeMoney>0 and a.ShenHe=1 and (b.h_LxMoney>0 or b.h_Money>0) and b.h_hkQk='未还款'
and b.h_date between @Date and Convert(Varchar(10),GetDate()+3,120)
Select @cou1 As JtLxc,@cou2 As StLxc
CREATE PROCEDURE Cx_indexJl
@TxTs int,@Bm nVarchar(20)
WITH ENCRYPTION
AS
Declare @Date Datetime,@cou1 int,@cou2 int
Set @Date=Convert(Varchar(10),GetDate(),120)
select @Cou1=Count(*) from CkInfo a inner join Login b on a.Lrczy=b.CzyName where b.czyBm=@Bm and ShenHe=1 and
day(@Date)<>LastJxDate and YeMoney>0 and
(BeginDate+4<GetDate() and day(BeginDate)=day(@Date))
select @Cou2=Count(A.id) from DkInfo a,hkjhMan b,Login c
Where a.Lrczy=c.CzyName and c.czyBm=@Bm and
a.pzh=b.h_dh and a.YeMoney>0 and a.ShenHe=1 and (b.h_LxMoney>0 or b.h_Money>0) and b.h_hkQk='未还款'
and b.h_date between @Date and Convert(Varchar(10),GetDate()+3,120)
Select @cou1 As JtLxc,@cou2 As StLxc