create proc p_rbb
as
select sum(xsje) xsje,sum(jhdj*xssl) cbje from table_xsbb a inner join table_jhgl b
on datediff(d,sj,getdate())=0 and b.sph in (select a.sph from table_xsbb)
go
as
select sum(xsje) xsje,sum(jhdj*xssl) cbje from table_xsbb a inner join table_jhgl b
on datediff(d,sj,getdate())=0 and b.sph in (select a.sph from table_xsbb)
go
date(getdate())这就是日期型的了.如果取时间的话time(getdate())