CREATE PROCEDURE [Meter_XiaoQu]
@Datebegin datetime,
@Dateend datetime
as
set nocount on ------------***加上此句
declare @rc int
set @rc=datediff(month,@datebegin,@dateend)+1
set rowcount @rc
select sn=identity(int,0,1) into #t from syscolumns
set rowcount 0
select year=year(dateadd(month,sn,@datebegin)),month=month(dateadd(month,sn,@datebegin))
into #t1 from #t
select * from #t1GO
@Datebegin datetime,
@Dateend datetime
as
set nocount on ------------***加上此句
declare @rc int
set @rc=datediff(month,@datebegin,@dateend)+1
set rowcount @rc
select sn=identity(int,0,1) into #t from syscolumns
set rowcount 0
select year=year(dateadd(month,sn,@datebegin)),month=month(dateadd(month,sn,@datebegin))
into #t1 from #t
select * from #t1GO
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货